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
260
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
240
Other Decks in Programming
See All in Programming
【PHP】破壊的バージョンアップと戦った話〜決断と説得
satoshi256kbyte
0
120
自動で //nolint を挿入する取り組み / Gopher's Gathering
utgwkk
1
240
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
210
データの整合性を保つ非同期処理アーキテクチャパターン / Async Architecture Patterns
mokuo
34
12k
Ruby on cygwin 2025-02
fd0
0
130
2024年のWebフロントエンドのふりかえりと2025年
sakito
1
220
CNCF Project の作者が考えている OSS の運営
utam0k
5
680
ファインディの テックブログ爆誕までの軌跡
starfish719
2
1.1k
Amazon ECS とマイクロサービスから考えるシステム構成
hiyanger
2
490
SwiftUIで単方向アーキテクチャを導入して得られた成果
takuyaosawa
0
260
Bedrock Agentsレスポンス解析によるAgentのOps
licux
1
380
いりゃあせ、PHPカンファレンス名古屋2025 / Welcome to PHP Conference Nagoya 2025
ttskch
1
260
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
It's Worth the Effort
3n
184
28k
Embracing the Ebb and Flow
colly
84
4.6k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
51k
Git: the NoSQL Database
bkeepers
PRO
427
64k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Become a Pro
speakerdeck
PRO
26
5.1k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
How to Ace a Technical Interview
jacobian
276
23k
Music & Morning Musume
bryan
46
6.3k
How to train your dragon (web standard)
notwaldorf
90
5.8k
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!