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
290
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
250
Other Decks in Programming
See All in Programming
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
500
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
160
A2A プロトコルを試してみる
azukiazusa1
2
1.1k
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
370
Blazing Fast UI Development with Compose Hot Reload (droidcon New York 2025)
zsmb
1
190
Deep Dive into ~/.claude/projects
hiragram
8
1.4k
GraphRAGの仕組みまるわかり
tosuri13
7
480
Gleamという選択肢
comamoca
6
760
Effect の双対、Coeffect
yukikurage
5
1.5k
ASP.NETアプリケーションのモダナイズ インフラ編
tomokusaba
1
410
FormFlow - Build Stunning Multistep Forms
yceruto
1
190
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
190
Featured
See All Featured
Building Adaptive Systems
keathley
43
2.6k
Fireside Chat
paigeccino
37
3.5k
Why Our Code Smells
bkeepers
PRO
337
57k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Stop Working from a Prison Cell
hatefulcrawdad
270
20k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Making Projects Easy
brettharned
116
6.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
790
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
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!