Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
Webの地図
yosuke_furukawa
PRO
6
4.9k
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
3k
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
400
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
320
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
9k
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
4.4k
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
550
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
220
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
1
560
AHC070解法紹介
eijirou
0
140
すこし踏み込む CancellationToken
htkym
2
1.4k
Security issues being discussed on Web Platforms
petamoriken
0
1.3k
Featured
See All Featured
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
370
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
530
Tell your own story through comics
letsgokoyo
1
1.1k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
270
Building a Scalable Design System with Sketch
lauravandoore
464
34k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
First, design no harm
axbom
PRO
2
1.3k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
390
Game over? The fight for quality and originality in the time of robots
wayneb77
1
290
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
710
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