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
220
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
280
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
240
Other Decks in Programming
See All in Programming
マルチアカウント環境での、そこまでがんばらない RI/SP 運用設計
wa6sn
0
610
RubyKaigiで手に入れた HHKB Studioのための HIDRawドライバ
iberianpig
0
1k
Denoでフロントエンド開発 2025年春版 / Frontend Development with Deno (Spring 2025)
petamoriken
1
1.3k
Defying Front-End Inertia: Inertia.js on Rails
skryukov
0
220
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
250
php-fpm がリクエスト処理する仕組みを追う / Tracing-How-php-fpm-Handles-Requests
shin1x1
5
850
PHPUnit 高速化テクニック / PHPUnit Speedup Techniques
pinkumohikan
1
1.2k
PHPのガベージコレクションを深掘りしよう
rinchoku
0
250
AHC 044 混合整数計画ソルバー解法
kiri8128
0
300
WordPress Playground for Developers
iambherulal
0
120
AIコードエディタの基盤となるLLMのFlutter性能評価
alquist4121
0
130
Return of the Full-Stack Developer
simas
PRO
1
320
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.3k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
118
51k
Speed Design
sergeychernyshev
28
870
Testing 201, or: Great Expectations
jmmastey
42
7.4k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
30
1.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
29
2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
12
1.4k
Designing for humans not robots
tammielis
251
25k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
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!