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
GC25 Recap: The Code You Reviewed is Not the Code You Built / #newt_gophercon_tour
mazrean
0
130
品質ワークショップをやってみた
nealle
0
660
マンガアプリViewerの大画面対応を考える
kk__777
0
430
マイベストのシンプルなデータ基盤の話 - Googleスイートとのつき合い方 / mybest-simple-data-architecture-google-nized
snhryt
0
110
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.6k
Module Proxyのマニアックな話 / Niche Topics in Module Proxy
kuro_kurorrr
0
200
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
400
Designing Repeatable Edits: The Architecture of . in Vim
satorunooshie
0
190
Researchlyの開発で参考にしたデザイン
adsholoko
0
100
ビルドプロセスをデバッグしよう!
yt8492
0
150
Go言語はstack overflowの夢を見るか?
logica0419
0
660
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
620
Featured
See All Featured
BBQ
matthewcrist
89
9.9k
How STYLIGHT went responsive
nonsquared
100
5.9k
Designing for humans not robots
tammielis
254
26k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Visualization
eitanlees
150
16k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
GraphQLとの向き合い方2022年版
quramy
49
14k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Building a Scalable Design System with Sketch
lauravandoore
463
33k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
A better future with KSS
kneath
239
18k
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!