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
250
Conceitos que podem te ajudar a escrever testes melhores
igorffs
4
240
Other Decks in Programming
See All in Programming
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
Arm移行タイムアタック
qnighy
0
320
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
290
watsonx.ai Dojo #4 生成AIを使ったアプリ開発、応用編
oniak3ibm
PRO
1
100
Jakarta EE meets AI
ivargrimstad
0
540
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
210
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Contemporary Test Cases
maaretp
0
140
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Documentation Writing (for coders)
carmenintech
65
4.4k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Done Done
chrislema
181
16k
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!