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 - Test Driven Development
Search
Scalone
November 12, 2014
Programming
1
140
TDD - Test Driven Development
A superficial presentation about TDD, in portuguese, to FATEC Tech Week (Franca, SP, Brasil).
Scalone
November 12, 2014
Tweet
Share
More Decks by Scalone
See All by Scalone
TDD - Test Driven Development
scalone
0
3
Ruby, Web and IOT with the same Platform
scalone
0
86
20k mRuby devices in Production
scalone
0
440
DaFunk, IOT Framework in Ruby
scalone
0
160
Concurrency in the imperative and functional world
scalone
0
200
Git e Github
scalone
0
89
Git, o que é, do que é feito, para que serve?
scalone
0
330
DaFunk, IOT Framework in Ruby
scalone
0
190
Uzmenino Marketplace
scalone
0
120
Other Decks in Programming
See All in Programming
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
480
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
18
9.8k
Rancher と Terraform
fufuhu
2
200
Improving my own Ruby thereafter
sisshiki1969
1
150
AIエージェント開発、DevOps and LLMOps
ymd65536
1
380
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
400
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
820
実用的なGOCACHEPROG実装をするために / golang.tokyo #40
mazrean
1
220
為你自己學 Python - 冷知識篇
eddie
1
340
Microsoft Orleans, Daprのアクターモデルを使い効率的に開発、デプロイを行うためのSekibanの試行錯誤 / Sekiban: Exploring Efficient Development and Deployment with Microsoft Orleans and Dapr Actor Models
tomohisa
0
240
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
270
rage against annotate_predecessor
junk0612
0
160
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Git: the NoSQL Database
bkeepers
PRO
431
66k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
Agile that works and the tools we love
rasmusluckow
330
21k
Producing Creativity
orderedlist
PRO
347
40k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
How to train your dragon (web standard)
notwaldorf
96
6.2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.4k
Transcript
TDD Test Driven Development
THIAGO SCALONE
@SCALONE
TDD Test Driven Development
O QUE É TESTE?
–Wikipédia “O teste do software é a investigação do software
a fim de fornecer informações sobre sua qualidade em relação ao contexto em que ele deve operar. Isso inclui o processo de utilizar o produto para encontrar seus defeitos.”
O QUE É TDD? Desenvolvimento Orientado a Teste
– Wikipédia “Processo de desenvolvimento de software aonde se escreve
o teste primeiro”
TESTE PRIMEIRO? show me the code!
MUNDO REAL
HISTORINHA
ERA UMA VEZ UM PROJETO
LINDO MARAVILHO
O TEMPO
O PROJETO SE TRANSFORMA
CÓDIGO LEGADO
LENTO
CLIENTES IRRITADOS
DIFÍCIL MANUTENÇÃO
Alteração
Alteração Teste Manual
Alteração Teste Manual
Alteração Teste Manual Produção
Alteração Teste Manual Produção
Alteração Teste Manual Produção
CÓDIGO LEGADO SEM TESTE
–Kent Beck “The more stress you feel, the less testing
you will do”
–Kent Beck “The less testing you do, the more errors
you will make”
NÃO POSSO MUDAR O PASSADO
PRECISO ESCREVER TESTES
EU AMO SOFTWARE
VAMOS VOLTAR UM POUCO
HISTÓRIA DO TDD
12000 BC - FOGO
18XX - PRIMEIRO PROGRAMA Ada Lovelace <3
18XX - PRIMEIRO BUG Preciso de testes….
1957 - CITAÇÃO DE TESTES “The first attack on the
checkout problem may be made before coding is begun” - Michael Bolton
1959/63 - NASA PROJECT MERCURY
1989 - JERRY WEINBERG Cartões perfurados!!!
1994 - KENT BECK SUnit, primeiro framework para testes, em
Smaltalk
1995 - MOVIMENTO XP Kent Beck outra vez
EXTREME PROGRAMMING Feedback rápido Presumir simplicidade Mudanças incrementais Abraçar mudanças
Trabalho de alta qualidade.
COMO TDD?
BABY STEPS
RED, GREEN, REFACTOR
RED GREEN REFACTOR
RED GREEN REFACTOR
RED GREEN REFACTOR
RED GREEN REFACTOR
COBERTURA
DIMINUIR DEPENDÊNCIA
MODULAR
O QUE É TEST ANTES?
PREVENÇÃO DE BUGS
–Robert C. Martin “Testing is about trust.”
CONFIANÇA
DOCUMENTAÇÃO
BOM DESIGN Código legível Pequeno Simples
QUALIDADE
CLIENTE FELIZ
SONO
E AONDE NÃO APLICA?
SISTEMAS MUITOS DISTRIBUIDOS Dependência entre serviços
AMBIENTE NÃO REPRODUZÍVEL Satélite Embedded Kernel Space Alguns drivers
PROTÓTIPOS Não faz sentido
HISTORINHA?
TDD
SONO
NÃO
NO SILVER BULLET
OBRIGADO
LIVROS
TEST DRIVEN DEVELOPMENT: BY EXAMPLE
GROWING OBJECT- ORIENTED SOFTWARE, GUIDED BY TESTS
TEST DRIVEN DEVELOPMENT FOR EMBEDDED C
TEST-DRIVEN DEVELOPMENT A PRACTICAL GUIDE
TEST DRIVEN DEVELOPMENT: TESTE E DESIGN NO MUNDO REAL COM
RUBY