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
290
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
More Decks by Mateus Guimarães
See All by Mateus Guimarães
Unveiling the Modular Monolith — Laracon EU 2024
mateusjatenee
0
370
Desbravando monolitos modulares
mateusjatenee
0
110
Scaling The Monolith
mateusjatenee
0
500
Escalando um Monolito em Laravel
mateusjatenee
0
400
Other Decks in Programming
See All in Programming
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
850
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
340
FastAPI の並行処理モデルを完全に理解する
hoto17296
9
3.8k
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
2
120
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
260
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
0
230
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
私のClaude Code活用法 (個人開発編) - PHPerKaigi mini #4(2026/08/24)
panda_program
1
210
AIエージェント時代のコードレビューを設計する
nogu66
6
2.5k
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
110
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
270
RSSとCodexを使ってX投稿自動化してみた
ochtum
0
110
Featured
See All Featured
Design in an AI World
tapps
1
300
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
530
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
For a Future-Friendly Web
brad_frost
183
10k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
590
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.5k
Agile that works and the tools we love
rasmusluckow
331
22k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
380
How to train your dragon (web standard)
notwaldorf
97
6.8k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
230
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
430
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