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
Memory API : Patterns, Performance et Cas d'Utilisation
josepaumard
0
140
リストビュー画面UX改善の振り返り
splcywolf
0
150
ウォンテッドリーの「ココロオドル」モバイル開発 / Wantedly's "kokoro odoru" mobile development
kubode
1
140
Optimizing JRuby 10
headius
0
360
DataStoreをテストする
mkeeda
0
290
PHPバージョンアップから始めるOSSコントリビュート / how2oss-contribute
dmnlk
1
1.1k
Deoptimization: How YJIT Speeds Up Ruby by Slowing Down / RubyKaigi 2025
k0kubun
0
860
ミリしらMCP勉強会
watany
4
770
Dissecting and Reconstructing Ruby Syntactic Structures
ydah
1
750
Do Dumb Things
mitsuhiko
0
440
Amazon CloudWatchの地味だけど強力な機能紹介!
itotsum
0
170
AI Coding Agent Enablement - エージェントを自走させよう
yukukotani
14
6.1k
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
90
6k
Practical Orchestrator
shlominoach
186
11k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
34
2.2k
Documentation Writing (for coders)
carmenintech
69
4.7k
Designing for humans not robots
tammielis
252
25k
4 Signs Your Business is Dying
shpigford
183
22k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
680
It's Worth the Effort
3n
184
28k
Making the Leap to Tech Lead
cromwellryan
133
9.2k
Designing Experiences People Love
moore
141
24k
Fireside Chat
paigeccino
37
3.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
5
550
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!