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
280
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
250
Other Decks in Programming
See All in Programming
TypeScript製IaCツールのAWS CDKが様々な言語で実装できる理由 ~他言語変換の仕組み~ / cdk-language-transformation
gotok365
7
380
UPDATEがシステムを複雑にする? イミュータブルデータモデルのすすめ
shimomura
0
220
コードに語らせよう――自己ドキュメント化が内包する楽しさについて / Let the Code Speak
nrslib
5
1.1k
Agent Rules as Domain Parser
yodakeisuke
1
350
What Spring Developers Should Know About Jakarta EE
ivargrimstad
1
610
Zennの運営完全に理解した #完全に理解したTalk
wadayusuke
1
140
TVer iOSチームの共通認識の作り方 - Findy Job LT iOSアプリ開発の裏側 開発組織が向き合う課題とこれから
techtver
PRO
0
710
Doma で目指す ORM 最適解
nakamura_to
1
160
複数アプリケーションを育てていくための共通化戦略
irof
2
700
Proxmoxをまとめて管理できるコンソール作ってみました
karugamo
1
410
TypeScript Language Service Plugin で CSS Modules の開発体験を改善する
mizdra
PRO
3
2.4k
ts-morph実践:型を利用するcodemodのテクニック
ypresto
1
540
Featured
See All Featured
Docker and Python
trallard
44
3.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.6k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.5k
Six Lessons from altMBA
skipperchong
28
3.8k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
4 Signs Your Business is Dying
shpigford
183
22k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Writing Fast Ruby
sferik
628
61k
Fireside Chat
paigeccino
37
3.5k
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!