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
330
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
270
Other Decks in Programming
See All in Programming
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
620
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
470
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
110
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
430
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
190
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
680
Android CLI
fornewid
0
190
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
110
5分で問診!Composer セキュリティ健康診断
codmoninc
0
680
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
280
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
430
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
550
Featured
See All Featured
Designing for Performance
lara
611
70k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Become a Pro
speakerdeck
PRO
31
6k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.4k
A Tale of Four Properties
chriscoyier
163
24k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Technical Leadership for Architectural Decision Making
baasie
3
450
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Odyssey Design
rkendrick25
PRO
2
730
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
530
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
330
How to build a perfect <img>
jonoalderson
1
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!