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
250
1
Share
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
320
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
270
Other Decks in Programming
See All in Programming
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
520
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
5.1k
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
580
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
290
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
830
存在論的プログラミング: 時間と存在を記述する
koriym
5
700
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
320
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
130
見せてもらおうか、 OpenSearchの性能とやらを!
shunta27
1
160
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
420
AI活用のコスパを最大化する方法
ochtum
0
360
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.4k
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
2
240
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
Making Projects Easy
brettharned
120
6.6k
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
30 Presentation Tips
portentint
PRO
1
270
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.6k
Embracing the Ebb and Flow
colly
88
5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Into the Great Unknown - MozCon
thekraken
40
2.3k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
96
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
460
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!