Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Testando aplicação phoenix
Search
Igor Florian
January 30, 2016
Programming
1
210
Testando aplicação phoenix
Igor Florian
January 30, 2016
Tweet
Share
More Decks by Igor Florian
See All by Igor Florian
Você não está sozinho, vá pra produção com Elixir!
igorffs
3
240
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
230
Other Decks in Programming
See All in Programming
if constexpr文はテンプレート世界のラムダ式である
faithandbrave
2
350
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
320
HUIT新歓2024「競技プログラミング、やってみませんか?」
slephy2784
1
250
今の SmartHR にエンジニアで入社するとどうなるの?
daisukeshinoku
5
4.6k
CA.swift19 恋するAIアプリ開発の裏側
oskmr
0
350
Javaエンジニアのための Nodejs/Nuxt3入門
hidekatsu_izuno
0
280
AWS Application Composerで始める、 サーバーレスなデータ基盤構築 / 20240406-jawsug-hokuriku-shinkansen
kasacchiful
1
250
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.7k
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
5
710
GraphQLサーバの構成要素を整理する #ハッカー鮨 #tsukijigraphql / graphql server technology selection
izumin5210
4
550
Ruby Pattern Matching
bkuhlmann
0
920
スクラムチームと認知負荷 - ニフティのスクラムトーク Vol2. / NIFTY Tech Talk #18
niftycorp
PRO
1
120
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
132
6.2k
Building an army of robots
kneath
300
41k
The Pragmatic Product Professional
lauravandoore
24
5.8k
We Have a Design System, Now What?
morganepeng
42
6.7k
Web development in the modern age
philhawksworth
202
10k
Statistics for Hackers
jakevdp
789
220k
The Cost Of JavaScript in 2023
addyosmani
14
3.8k
Infographics Made Easy
chrislema
237
18k
Being A Developer After 40
akosma
56
580k
A Philosophy of Restraint
colly
196
16k
A better future with KSS
kneath
231
16k
10 Git Anti Patterns You Should be Aware of
lemiorhan
646
58k
Transcript
@igorflorianfs IGOR FLORIAN
TESTANDO SUA APLICAÇÃO WEB PHOENIX
ExUnit
http://elixir-lang.org/docs/stable/ex_unit/ExUnit.html
Channel
http://hexdocs.pm/phoenix/Phoenix.Channel.html
Overview
• Model • View & Template • Controller • Acceptance
• Fixture
✋
Nas camadas da aplicação você verá
None
web/web.ex
None
E nos testes…
None
Test Cases
None
None
None
None
MODEL
None
None
Foco nas validações
Changeset
None
None
None
https://hexdocs.pm/ecto/Ecto.Changeset.html
CONTROLLER
Características da conexão
None
None
Plug.Conn
None
https://hexdocs.pm/plug/Plug.Conn.html
None
None
VIEW & TEMPLATE
VIEWS == funções puras
None
None
TEMPLATES testamos diferente!
None
EEX
None
ACCEPTANCE
Hound
None
None
None
None
https://github.com/HashNuke/hound
Lembre-se, testes de aceitação são lentos
http://blog.plataformatec.com.br/2016/01/writing-acceptance-tests-in-phoenix/
Test Data
Ecto
None
ExMachina
FactoryGirl feelings
None
None
https://github.com/thoughtbot/ex_machina
Spoiler Ecto 2.0
None
None
None
https://github.com/elixir-lang/ecto
Obrigado!