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
210
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
250
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
240
Other Decks in Programming
See All in Programming
Ebitengineの1vs1ゲーム WebRTCの活用
ponyo877
0
380
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
490
REXML改善のその後
naitoh
0
190
Lessons by WebAssembly app in production on CDN Edge Computing Service
tetsuharuohzeki
0
210
connect-go で面倒くささと戦う / 2024-08-27 #newmo_layerx_go
izumin5210
2
650
Swiftコードバトル必勝法
toshi0383
0
170
Increased Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
380
LangGraphでのHuman-in-the-Loopの実装
os1ma
3
1.1k
意外とフォントが大事だった話 / Font Issues on Internationalization
fumi23
0
110
Kotlin 2.0が与えるAndroid開発の進化
masayukisuda
1
410
GraphQLの魅力を引き出すAndroidクライアント実装
morux2
3
680
Prompt Cachingは本当に効果的なのか検証してみた.pdf
ttnyt8701
0
530
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
65
9.8k
Building Your Own Lightsaber
phodgson
101
6k
Happy Clients
brianwarren
96
6.6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
38
9.2k
Statistics for Hackers
jakevdp
794
220k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
58k
Done Done
chrislema
180
16k
Principles of Awesome APIs and How to Build Them.
keavy
125
16k
Web Components: a chance to create the future
zenorocha
309
42k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
190
16k
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!