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
generative-ai-use-cases(GenU)の推しポイント ~2025年4月版~
hideg
1
410
複雑なフォームの jotai 設計 / Designing jotai(state) for Complex Forms #layerx_frontend
izumin5210
6
1.6k
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
910
読書シェア会 vol.4 『ダイナミックリチーミング 第2版』
kotaro666
0
110
「理解」を重視したAI活用開発
fast_doctor
0
310
GitHub Copilot for Azureを使い倒したい
ymd65536
1
330
今話題のMCPサーバーをFastAPIでサッと作ってみた
yuukis
0
130
データベースの技術選定を突き詰める ~複数事例から考える最適なデータベースの選び方~
nnaka2992
3
1.8k
SwiftDataのカスタムデータストアを試してみた
1mash0
0
150
UMAPをざっくりと理解 / Overview of UMAP
kaityo256
PRO
3
1.6k
はじめてのPDFKit.pdf
shomakato
0
100
iOSアプリで測る!名古屋駅までの 方向と距離
ryunakayama
0
160
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.7k
Typedesign – Prime Four
hannesfritz
41
2.6k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Making Projects Easy
brettharned
116
6.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.6k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Unsuck your backbone
ammeep
671
58k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Automating Front-end Workflow
addyosmani
1370
200k
RailsConf 2023
tenderlove
30
1.1k
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!