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
250
1
Share
Testando aplicação phoenix
Igor Florian
January 30, 2016
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
270
Other Decks in Programming
See All in Programming
ルールルルルルRubyの中身の予備知識 ── RubyKaigiの前に予習しなイカ?
ydah
1
180
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
200
Claude Codeをカスタムして自分だけのClaude Codeを作ろう
terisuke
0
140
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
210
10 Tips of AWS ~Gen AI on AWS~
licux
5
410
感情を設計する
ichimichi
5
1.5k
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
820
AI-DLC Deep Dive
yuukiyo
9
4.2k
How Swift's Type System Guides AI Agents
koher
0
270
Coding as Prompting Since 2025
ragingwind
0
830
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
220
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
140
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
We Have a Design System, Now What?
morganepeng
55
8.1k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
210
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
170
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Google's AI Overviews - The New Search
badams
0
980
Everyday Curiosity
cassininazir
0
200
Speed Design
sergeychernyshev
33
1.6k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
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!