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
Mateus Guimarães
October 08, 2016
Programming
0
270
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
340
Desbravando monolitos modulares
mateusjatenee
0
100
Scaling The Monolith
mateusjatenee
0
460
Escalando um Monolito em Laravel
mateusjatenee
0
370
Other Decks in Programming
See All in Programming
高速開発のためのコード整理術
sutetotanuki
1
370
Patterns of Patterns
denyspoltorak
0
1.3k
ThorVG Viewer In VS Code
nors
0
760
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.8k
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.4k
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
6.2k
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
1k
Data-Centric Kaggle
isax1015
2
750
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
110
.NET Conf 2025 の興味のあるセッ ションを復習した / dotnet conf 2025 quick recap for backend engineer
tomohisa
0
130
Featured
See All Featured
Marketing to machines
jonoalderson
1
4.6k
How to make the Groovebox
asonas
2
1.9k
How to train your dragon (web standard)
notwaldorf
97
6.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How to build a perfect <img>
jonoalderson
1
4.9k
Paper Plane
katiecoart
PRO
0
46k
Building Applications with DynamoDB
mza
96
6.9k
Color Theory Basics | Prateek | Gurzu
gurzu
0
190
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Getting science done with accelerated Python computing platforms
jacobtomlinson
1
110
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
170
A Soul's Torment
seathinner
5
2.2k
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