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
260
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
330
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
270
Other Decks in Programming
See All in Programming
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.5k
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
170
A2UI という光を覗いてみる
satohjohn
1
150
RTSPクライアントを自作してみた話
simotin13
0
630
New "Type" system on PicoRuby
pocke
1
1k
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.4k
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
150
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
130
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.8k
AIで効率化できた業務・日常
ochtum
0
140
スマートグラスで並列バイブコーディング
hyshu
0
260
Vite+ Unified Toolchain for the Web
naokihaba
0
340
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.1k
The agentic SEO stack - context over prompts
schlessera
0
820
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
Ethics towards AI in product and experience design
skipperchong
2
310
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Six Lessons from altMBA
skipperchong
29
4.3k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
310
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
370
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.5k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.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!