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
220
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
270
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
240
Other Decks in Programming
See All in Programming
気がついたら子供が社会人になって 自分と同じモバイルアプリエンジニアになった件 / Parent-Child Engineers
koishi
0
230
RecSys2024 参加報告
unonao
1
160
CTFのWebにおける⾼難易度問題について
hamayanhamayan
1
770
AtCoder Heuristic First-step Vol.1 講義スライド
terryu16
2
410
신입 안드로이드 개발자의 AI 스타트업 생존기 (+ Native C++ Code를 Android에서 사용해보기)
dygames
0
450
iOSでQRコード生成奮闘記
ktcryomm
2
190
なぜselectはselectではないのか
taiyow
2
170
やっと腹落ち「スプリント毎に動くモノをリリースする」〜ゼロから始めるメガバンクグループのアジャイル実践〜
sasakendayo
1
310
Devin入門 〜月500ドルから始まるAIチームメイトとの開発生活〜 / Introduction Devin 〜Development With AI Teammates〜
rkaga
6
2.2k
DenoでOpenTelemetryに入門する
yotahada3
1
250
❄️ NixOS/nixpkgsにSATySFiサポートを実装する
momeemt
2
160
ステートソーシング型イベント駆動の視点で捉えるCQRS+ES
shinnosuke0522
0
250
Featured
See All Featured
Writing Fast Ruby
sferik
628
61k
Gamification - CAS2011
davidbonilla
80
5.2k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
GraphQLの誤解/rethinking-graphql
sonatard
69
10k
Six Lessons from altMBA
skipperchong
27
3.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.5k
Product Roadmaps are Hard
iamctodd
PRO
51
11k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
101
18k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.7k
Mobile First: as difficult as doing things right
swwweet
223
9.5k
GitHub's CSS Performance
jonrohan
1030
460k
KATA
mclloyd
29
14k
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!