Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
TypeScript 5.9 で使えるようになった import defer でパフォーマンス最適化を実現する
bicstone
1
1.3k
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
11
11k
AWS CDKの推しポイントN選
akihisaikeda
1
240
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
9
1.1k
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
140
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
610
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
230
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
750
Developing static sites with Ruby
okuramasafumi
0
260
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
700
sbt 2
xuwei_k
0
260
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
1
1k
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
700
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Code Reviewing Like a Champion
maltzj
527
40k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
Thoughts on Productivity
jonyablonski
73
5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Music & Morning Musume
bryan
46
7k
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!