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
290
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
250
Other Decks in Programming
See All in Programming
関数型まつりレポート for JuliaTokai #22
antimon2
0
130
deno-redisの紹介とJSRパッケージの運用について (toranoana.deno #21)
uki00a
0
130
Development of an App for Intuitive AI Learning - Blockly Summit 2025
teba_eleven
0
120
単体テストの始め方/作り方
toms74209200
0
510
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
1
410
LINEヤフー データグループ紹介
lycorp_recruit_jp
0
760
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
11
2.8k
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
240
Passkeys for Java Developers
ynojima
3
870
Team topologies and the microservice architecture: a synergistic relationship
cer
PRO
0
910
Is Xcode slowly dying out in 2025?
uetyo
1
170
赤裸々に公開。 TSKaigiのオフシーズン
takezoux2
0
140
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
16
940
Six Lessons from altMBA
skipperchong
28
3.8k
How STYLIGHT went responsive
nonsquared
100
5.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
How to train your dragon (web standard)
notwaldorf
92
6.1k
Product Roadmaps are Hard
iamctodd
PRO
53
11k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Building an army of robots
kneath
306
45k
The Cult of Friendly URLs
andyhume
79
6.4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
Code Reviewing Like a Champion
maltzj
524
40k
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!