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
250
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
320
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
260
Other Decks in Programming
See All in Programming
Windows on Ryzen and I
seosoft
0
350
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
500
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
230
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
150
AI活用のコスパを最大化する方法
ochtum
0
270
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
200
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2k
20260315 AWSなんもわからん🥲
chiilog
2
170
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
1.1k
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
610
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
270
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
2
280
Featured
See All Featured
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.5k
Designing Powerful Visuals for Engaging Learning
tmiket
0
290
WCS-LA-2024
lcolladotor
0
490
For a Future-Friendly Web
brad_frost
183
10k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
Scaling GitHub
holman
464
140k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Speed Design
sergeychernyshev
33
1.6k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
100
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
91
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
110
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!