Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
410
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
250
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
1.5k
GISエンジニアから見たLINKSデータ
nokonoko1203
0
170
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
110
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
440
Graviton と Nitro と私
maroon1st
0
120
JETLS.jl ─ A New Language Server for Julia
abap34
2
430
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
590
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
130
俺流レスポンシブコーディング 2025
tak_dcxi
14
9.2k
AIコーディングエージェント(Gemini)
kondai24
0
250
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Building Flexible Design Systems
yeseniaperezcruz
330
39k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
180
Done Done
chrislema
186
16k
Navigating Team Friction
lara
191
16k
Between Models and Reality
mayunak
0
150
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
30
Marketing to machines
jonoalderson
1
4.3k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
130
Git: the NoSQL Database
bkeepers
PRO
432
66k
RailsConf 2023
tenderlove
30
1.3k
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