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
260
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Testando aplicação phoenix
Igor Florian
January 30, 2016
More Decks by Igor Florian
See All by Igor Florian
Você não está sozinho, vá pra produção com Elixir!
igorffs
3
340
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
270
Other Decks in Programming
See All in Programming
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
46
30k
プロポーザルを書いてもらう
pvcresin
0
590
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
630
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
4
2.3k
VibeCodingからAgenticWorkflowへ
starfish719
0
1k
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
480
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
210
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
250
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
410
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
670
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.8k
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
2
1.3k
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
300
Agile that works and the tools we love
rasmusluckow
331
22k
What's in a price? How to price your products and services
michaelherold
247
13k
The Spectacular Lies of Maps
axbom
PRO
1
950
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
450
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Bash Introduction
62gerente
615
220k
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!