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
TDD: Por que e por onde começar
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Mateus Guimarães
October 08, 2016
Programming
0
280
TDD: Por que e por onde começar
Por que TDD?
Quando escrever testes?
Quais benefícios tenho escrevendo testes?
Mateus Guimarães
October 08, 2016
Tweet
Share
More Decks by Mateus Guimarães
See All by Mateus Guimarães
Unveiling the Modular Monolith — Laracon EU 2024
mateusjatenee
0
350
Desbravando monolitos modulares
mateusjatenee
0
100
Scaling The Monolith
mateusjatenee
0
470
Escalando um Monolito em Laravel
mateusjatenee
0
380
Other Decks in Programming
See All in Programming
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.1k
へんな働き方
yusukebe
6
2.8k
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
210
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
370
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
110
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.4k
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
180
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
160
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
240
Nuxt Server Components
wattanx
0
130
飯MCP
yusukebe
0
360
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
1.1k
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.5k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
280
Chasing Engaging Ingredients in Design
codingconduct
0
150
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Producing Creativity
orderedlist
PRO
348
40k
Code Reviewing Like a Champion
maltzj
528
40k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
Designing Powerful Visuals for Engaging Learning
tmiket
0
300
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.4k
Transcript
TDD Por que e por onde começar
O que é Test-Driven Development?
None
• Menos erros • Menos dor de cabeça • Código
menor e conciso • Testar algo manualmente é chato e demorado • Trabalho em equipe mais fácil • Divertido!
TDD não é mágico Bugs irão ocorrer, mesmo escrevendo testes
PHPUnit • O maior framework de testes para PHP •
Configurações ficam no arquivo phpunit.xml
None
Nosso app
Nosso primeiro teste O que fazemos? Criamos dois registros do
model Book, Fazemos uma requisição para api/books Verificamos se o JSON certo é retornado Verificamos se o código HTTP é 200
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
Esse código existe
None
None
None
None
None
None
None
None
None
Testes Unitários • Extremamente rápidos • Mais difíceis de quebrar
• Testam uma pequena unidade do código
None
None
None
None
None
Mateus Guimarães Desenvolvedor @ Weenside
[email protected]
https://mguimaraes.co https://github.com/mateusjatenee https://twitter.com/mateusjatenee