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
230
Other Decks in Programming
See All in Programming
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
140
最古の関数型言語「Lisp」ことはじめ / lisp_in_kamiyama
uhooi
1
190
12年前の『型システム入門』翻訳の思い出話
mame
11
1.2k
Ruby メモリ管理 プログラミング
megmogmog1965
0
130
Webエディタライブラリ 「CodeMirror」から学ぶ Webアプリ開発のテクニック
ryosukeigarashi
0
250
유연한 Composable 설계
l2hyunwoo
0
380
ぼっちを避けて楽しむためのアノテコノテ / Various Tips and Tricks to Avoid Loneliness and Have Fun
nrslib
3
1.7k
大規模マルチテナントを解決するYugabyteDBという選択肢
nnaka2992
1
250
継続的な活動で築く地方エンジニアの道
myamashii
2
360
英語
s_shimotori
1
220
最近追加した型の紹介とその振り返り
aki19035vc
0
180
生成AIをkintoneに連携してみた
hideg
0
230
Featured
See All Featured
The Cult of Friendly URLs
andyhume
75
5.9k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
20
7.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
262
13k
Docker and Python
trallard
37
2.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
325
21k
Infographics Made Easy
chrislema
238
18k
Documentation Writing (for coders)
carmenintech
63
4.2k
Design by the Numbers
sachag
277
18k
Optimizing for Happiness
mojombo
373
69k
Designing with Data
zakiwarfel
96
5k
Become a Pro
speakerdeck
PRO
15
4.8k
Teambox: Starting and Learning
jrom
130
8.6k
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!