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
470
Escalando um Monolito em Laravel
mateusjatenee
0
380
Other Decks in Programming
See All in Programming
2026/02/04 AIキャラクター人格の実装論 口 調の模倣から、コンテキスト制御による 『思想』と『行動』の創発へ
sr2mg4
0
680
Ruby x Terminal
a_matsuda
7
580
atmaCup #23でAIコーディングを活用した話
ml_bear
4
740
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
7.5k
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
110
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
110
TipKitTips
ktcryomm
0
150
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
230
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
240
15年目のiOSアプリを1から作り直す技術
teakun
1
600
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
200
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
67
Building Adaptive Systems
keathley
44
2.9k
Optimizing for Happiness
mojombo
378
71k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Building an army of robots
kneath
306
46k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
Technical Leadership for Architectural Decision Making
baasie
3
270
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Practical Orchestrator
shlominoach
191
11k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
340
Skip the Path - Find Your Career Trail
mkilby
1
72
エンジニアに許された特別な時間の終わり
watany
106
240k
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