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
230
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
300
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
250
Other Decks in Programming
See All in Programming
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
180
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
180
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
1
330
CSC509 Lecture 06
javiergs
PRO
0
250
CSC509 Lecture 04
javiergs
PRO
0
300
株式会社 Sun terras カンパニーデック
sunterras
0
240
育てるアーキテクチャ:戦い抜くPythonマイクロサービスの設計と進化戦略
fujidomoe
1
150
CSC305 Lecture 05
javiergs
PRO
0
200
GitHub Actions × AWS OIDC連携の仕組みと経緯を理解する
ota1022
0
240
実践AIチャットボットUI実装入門
syumai
7
2.5k
開発者への寄付をアプリ内課金として実装する時の気の使いどころ
ski
0
360
どの様にAIエージェントと 協業すべきだったのか?
takefumiyoshii
2
610
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Making the Leap to Tech Lead
cromwellryan
135
9.5k
Automating Front-end Workflow
addyosmani
1371
200k
Being A Developer After 40
akosma
91
590k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.7k
How to train your dragon (web standard)
notwaldorf
96
6.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.7k
Site-Speed That Sticks
csswizardry
11
880
YesSQL, Process and Tooling at Scale
rocio
173
14k
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!