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
250
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
310
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
260
Other Decks in Programming
See All in Programming
CSC307 Lecture 03
javiergs
PRO
1
490
Oxlintはいいぞ
yug1224
5
1.3k
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
120
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
5
440
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
530
「ブロックテーマでは再現できない」は本当か?
inc2734
0
970
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
CSC307 Lecture 08
javiergs
PRO
0
670
CSC307 Lecture 07
javiergs
PRO
0
550
Featured
See All Featured
From π to Pie charts
rasagy
0
120
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
What's in a price? How to price your products and services
michaelherold
247
13k
The Invisible Side of Design
smashingmag
302
51k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Automating Front-end Workflow
addyosmani
1371
200k
Visualization
eitanlees
150
17k
Tell your own story through comics
letsgokoyo
1
810
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
Docker and Python
trallard
47
3.7k
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!