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
230
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
300
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
250
Other Decks in Programming
See All in Programming
AI 時代だからこそ抑えたい「価値のある」PHP ユニットテストを書く技術 #phpconfuk / phpcon-fukuoka-2025
shogogg
1
580
AI駆動開発ライフサイクル(AI-DLC)のホワイトペーパーを解説
swxhariu5
0
1.2k
Honoを技術選定したAI要件定義プラットフォームAcsimでの意思決定
codenote
0
250
GeistFabrik and AI-augmented software development
adewale
PRO
0
120
Patterns of Patterns (and why we need them)
denyspoltorak
0
110
2025 컴포즈 마법사
jisungbin
0
140
生成AIを活用したリファクタリング実践 ~コードスメルをなくすためのアプローチ
raedion
0
110
Flutterチームから作る組織の越境文化
findy_eventslides
0
530
Evolving NEWT’s TypeScript Backend for the AI-Driven Era
xpromx
0
150
知られているようで知られていない JavaScriptの仕様 4選
syumai
0
630
『実践MLOps』から学ぶ DevOps for ML
nsakki55
2
460
CSC509 Lecture 11
javiergs
PRO
0
310
Featured
See All Featured
A designer walks into a library…
pauljervisheath
210
24k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
Building an army of robots
kneath
306
46k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Documentation Writing (for coders)
carmenintech
76
5.1k
Making Projects Easy
brettharned
120
6.5k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
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!