SlideShare uma empresa Scribd logo
1 de 45
Baixar para ler offline
02 BARCELONA
David Ródenas, PhD
TDD Course
TEST DRIVEN
DEVELOPMENT
@drpicox
Breaking myths and understanding why
Software Values


The Triangle △ Example


Fixing Code Smells


Discipline


The Rules


TDD is Dead


TDD vs. BDD


Tips for adoption
TEST DRIVEN DEVELOPMENT
@drpicox
SOFTWARE VALUE
TDD 3
@drpicox
@drpicox
QUIZ
4
TDD — SOFTWARE VALUE
WHICH IS THE MAIN
SOFTWARE VALUE?
@drpicox
@drpicox
PRIMARY VALUE


The ability to tolerate and facilitate change
SOFTWARE VALUES
5
TDD — SOFTWARE VALUES
SECONDARY VALUE


The current software meets the current needs of the current user
@drpicox
@drpicox
ARE YOU A FORTUNE TELLER?
6
TDD — SOFTWARE VALUES
There are no oracles.
@drpicox
@drpicox
Rigidity


Dif
f
icult to change


Fragility


Changes breaks unrelated features


Immobility


Cannot extract/reuse a module


Needless complexity


Too much anticipation
CODE SMELLS
7
TDD — SOFTWARE VALUES
@drpicox
FIXING CODE SMELLS
TDD 8
@drpicox
@drpicox
WATERFALL DESIGN
9
TDD — FIXING CODE SMELLS
Code
The


Great


Refactor
Upfront


Design
Code Code Code Code
time
speed
@drpicox
@drpicox
10
TDD — FIXING CODE SMELLS
@drpicox
@drpicox
DESIGN YOUR WAY
11
TDD — FIXING CODE SMELLS
Refactor
Code Code Code Code
Refactor
Code
Refactor
Code Code Code
Refactor
time
speed
THE AGILE
@drpicox
@drpicox
How we know that we break no feature?
BUT REFACTOR IS DANGEROUS
12
TDD — FIXING CODE SMELLS
@drpicox
@drpicox
LEVERAGE ON TESTS
13
TDD — FIXING CODE SMELLS
CODE
TESTS
*we assume that we have good tests
@drpicox
@drpicox
Tests do also suffer from code smells


If a test is fragile, we cannot leverage on them to refactor code
BUT...
14
TDD — FIXING CODE SMELLS
Refactor
TESTS
?
@drpicox
DISCIPLINE
TDD 15
@drpicox
—Merriam-Webster dictionary
"DISCIPLINE:


TRAINING THAT CORRECTS, MOLDS, OR
PERFECTS THE MENTAL FACULTIES OR
MORAL CHARACTER"
TDD — DISCIPLINE 16
@drpicox
@drpicox
Accounting is a discipline that is in charge of
studying, measuring and analyzing the assets
and
f
inancial and economic situation of a
company or organization, in order to facilitate
decision-making within it and external control,
presenting the information , previously
registered, in a systematic and useful way for
the different interested parties.


ACCOUNTING
17
TDD — DISCIPLINE
—Wikipedia
Double-entry bookkeeping
In 70 AD Plinius the Elder described


the structure of the "Tabulae Rationum".
Account Debit Credit
Furniture $1,500
Cash $1,500
$1,500 $1,500
@drpicox
@drpicox
1. You are not allowed to write any production
code unless it is to make a failing unit test pass.


2. You are not allowed to write any more of a unit
test than is suf
f
icient to fail; and compilation
failures are failures.


3. You are not allowed to write any more
production code than is suf
f
icient to pass the
one failing unit test.
PROGRAMMING
18
TDD — DISCIPLINE
@drpicox
UNDERSTANDING DA RULES
TDD 19
@drpicox
@drpicox
It is a discipline of programming


about coding


about testing


and about design


(in the form of refactoring)
WHAT IS TDD?
20
TDD — THE RULES
@drpicox
@drpicox
The steps are the following:


write a “single” test describing an aspect of the program


run the test, which should fail because the program lacks that feature


write “just enough” code, the simplest possible, to make the test pass


“refactor” the code until it conforms to the simplicity criteria


repeat, “accumulating” unit tests over time
HOW FOLLOW THE RULES?
21
TDD — THE RULES
Write a Test
✘ Test Fails
✔ Test Passes
Write the Code
✔ Test Passes
Clean Code and Tests
@drpicox
@drpicox
WHO TESTS THE TEST?
22
TDD — THE RULES
Write a Test
✘ Test Fails
✔ Test Passes
Write the Code
✔ Test Passes
Clean Code and Tests
We know that code


works because tests.
We know that clean broke


nothing because tests.
It the test failing


who tests the test.
TDD SILVER RULE


You shall make tests fail
f
irst
@drpicox
@drpicox
?
CODE
HOW TO REFACTOR TESTS?
23
TDD — THE RULES
TESTS
@drpicox
@drpicox
TDD ESSENTIAL RULES
24
TDD — THE RULES
TDD SILVER RULE


You shall make tests fail
f
irst
TDD GOLDEN RULE


You shall iterate fast
@drpicox
@drpicox
TDD ESSENTIAL RULES
25
TDD — THE RULES
TDD GOLDEN RULE


You shall iterate fast
Write a Test
✘ Test Fails
✔ Test Passes
Write the Code
✔ Test Passes
Clean Code and Tests
30s


loop
@drpicox
@drpicox
DESIGN YOUR WAY
26
TDD — FIXING CODE SMELLS
Refactor
Code
time
speed
Refactor
Code
Refactor
Code
Refactor
Code
Refactor
Code
Refactor
Code
Refactor
Code
Refactor
Code
THE TDD
@drpicox
TDD IS DEAD
TDD — IS DEAD 27
@drpicox
@drpicox
https://www.infoq.com/news/2014/06/tdd-dead-controversy/
KILLING TDD
28
TDD — IS DEAD
David Heinemeier Hansson, Ruby on Rails author and founder of Basecamp gave
the opening keynote at Railsconf 2014 in which he challenged the value of TDD as
it is often implemented.


«Then I'd try test-first for a few weeks, only to drop it again when it started


hurting my designs.»


«"Code that's hard to test in isolation is poorly designed", goes a common TDD maxim.
Isolation meaning free of dependent context and separated from collaborators […] The
prevalent definition of "unit" in unit testing (though not everyone agrees with this).»


«Such damage is defined as changes to your code that either facilitates a) easier test-
first, b) speedy tests, or c) unit tests, but does so by harming the clarity of the code
through […]. Code that is warped out of shape solely to accomodate testing objectives.»
@drpicox
@drpicox
https://wiki.c2.com/?DeveloperTest
THE REAL TDD
29
TDD — IS DEAD
Ward Cunningham, inventor of Wiki, writer of the Agile Manifesto, inventor of the
test runner and run docs as test, co-inventor of XP and TDD, inventor of the
technical debt concept.


«A DeveloperTest is the correct name for what the industry generally calls a UnitTest. It
is a test written for developers, as distinct from an AcceptanceTest or CustomerTest,
written for the OnsiteCustomers.»


«Under the strict definition, for QA purposes, the failure of a UnitTest implicates only
one unit. You know exactly where to search to find the bug.»


«TestDrivenDevelopment produces DeveloperTests. The failure of a test case implicates
only the developer’s most recent edit.»
@drpicox
@drpicox
BOTH AXIS
30
TDD — IS DEAD
+legible
-legible
legibility
DEVELOPER TEST ACCEPTANCE TEST
UNIT TEST
E2E TEST
con
f
idence
-con
f
idence
+con
f
idence
INTEGRATED TEST
Best compromise
Double Con
f
idence


It does what code says


Everyone on same page
Developers fail


with TDD because of


they use the wrong


level of abstraction
@drpicox
@drpicox
THE ELEPHANT IN THE ROOM
31
TDD — IS DEAD
XY-1516


The new valuable
feature
5
IT2
IT1 IT3 IT4
XY-


1516
XY-


1517
XY-


1518
AA-


1121
AA-


0987
AA-


1122
Last day of IT3
EV-1516 is not


yet
f
inished,


why is that?
Well, the PR is
stopped, it requires


cleaning
Today
ends the iteration,
and there are
dependencies
Approve
that and do


the cleaning
later.
Ok.
Keep technical excellence at all
times


Technical debt charges interest every
feature


No one wants a big refactor


SAFe is Agile


Story points are estimates, not time boxes


Never ever and ever ask for
termination


Ask for new estimates instead, and replan
Continuous attention to
technical excellence


and good design enhances
agility.
https://agilemanifesto.org
* Never congratulate a team for
ff
erent primary value
«I had a problem. While using and teaching agile practices like test-driven development
(TDD) [...], I kept coming across the same confusion and misunderstandings.
Programmers wanted to know where to start, what to test and what not to test, how
much to test in one go, what to call their tests, and how to understand why a test fails.»


«I remember thinking “If only someone had told me that!” far more often than I
thought “Wow, a door has opened.” I decided it must be possible to present TDD in a
way that gets straight to the good stuff and avoids all the pitfalls.»


«At this point, I had a framework that helped me understand – and more importantly,
explain – how TDD works and an approach that avoided all the pitfalls I had
encountered.»


If we could develop a consistent vocabulary for analysts, testers, developers, and the
business, then we would be well on the way to eliminating some of the ambiguity and
miscommunication that occur when technical people talk to business people.
@drpicox
@drpicox
TDD SILVER RULE


You shall make tests fail
f
irst
TDD GOLDEN RULE


You shall iterate fast
BDD
@drpicox
@drpicox
TDD SILVER RULE


You shall make tests fail
f
irst
BDD GOLDEN RULE


You shall have a common language
TDD
35
TDD — VS. TDD
TDD SILVER RULE


You shall make tests fail
f
irst
TDD GOLDEN RULE


You shall iterate fast
BDD
@drpicox
@drpicox
THE PATH
36
TDD — VS. BDD
Acceptance


Test
TDD
BDD
Developer


Test
Feature: Is it Friday yet?


Everybody wants to know when it's Friday


Scenario: Sunday isn't Friday


Given today is Sunday


When I ask whether it's Friday yet


Then I should be told "Nope"
import { isItFridayYet } from '../'


test('Sunday isn't Friday', () => {


const today = new Date('Sunday 8/16/2020');


const answer = isItFridayYet(today);


expect(answer).toBe(false);


});
PO QA Dev
Dev
@drpicox
@drpicox
BOTH AXIS
37
TDD — VS. BDD
+legible
-legible
legibility
DEVELOPER TEST ACCEPTANCE TEST
UNIT TEST
E2E TEST
con
f
idence
-con
f
idence
+con
f
idence
INTEGRATED TEST
Fast enough for TDD


Create suits and focus
Usually too slow for TDD
TDD
BDD
@drpicox
TIPS FOR ADOPTION
TDD 38
@drpicox
@drpicox
Focus the most important suit and run every
minute


Run all developer tests at least every two
hours
RUN TESTS FREQUENTLY
39
TDD — TIPS FOR ADOPTION
@drpicox
@drpicox
The code is who teaches to the new
members


Testing code should be cleaner than
production code
CODE IS YOUR FRIEND
40
TDD — TIPS FOR ADOPTION
@drpicox
@drpicox
Once a developer needs to run the
application to develop, TDD is over.
MANUAL TESTING IS YOUR ENEMY
41
TDD — TIPS FOR ADOPTION
@drpicox
@drpicox
Think in Business Value.


BDD helps to TDD and vice-versa.
MOSTLY INTEGRATED
42
TDD — TIPS FOR ADOPTION
Unit
Test
@drpicox
@drpicox
MOSTLY INTEGRATED
43
TDD — TIPS FOR ADOPTION
@drpicox
@drpicox
MOSTLY INTEGRATED
44
TDD — TIPS FOR ADOPTION
The car lights the street
@drpicox
E.O.TDD

Mais conteúdo relacionado

Mais procurados

Tdd practices
Tdd practicesTdd practices
Tdd practicesaxykim00
 
Test driven development vs Behavior driven development
Test driven development vs Behavior driven developmentTest driven development vs Behavior driven development
Test driven development vs Behavior driven developmentGallop Solutions
 
Test driven development
Test driven developmentTest driven development
Test driven developmentNascenia IT
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven DevelopmentTung Nguyen Thanh
 
A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD) A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD) CodeOps Technologies LLP
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven DevelopmentViraf Karai
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)nedirtv
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentguestc8093a6
 
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...Zohirul Alam Tiemoon
 
Test Driven Development Powered by LEGO
Test Driven Development Powered by LEGOTest Driven Development Powered by LEGO
Test Driven Development Powered by LEGOAgile Montréal
 
Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010guest5639fa9
 
Scrum and Test-driven development
Scrum and Test-driven developmentScrum and Test-driven development
Scrum and Test-driven developmenttoteb5
 
Tdd in php a brief example
Tdd in php   a brief exampleTdd in php   a brief example
Tdd in php a brief exampleJeremy Kendall
 
TDD That Was Easy!
TDD   That Was Easy!TDD   That Was Easy!
TDD That Was Easy!Kaizenko
 
Introduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefIntroduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefAhmed Shreef
 

Mais procurados (20)

Tdd practices
Tdd practicesTdd practices
Tdd practices
 
Tdd com Java
Tdd com JavaTdd com Java
Tdd com Java
 
TDD = bra design?
TDD = bra design?TDD = bra design?
TDD = bra design?
 
Test driven development vs Behavior driven development
Test driven development vs Behavior driven developmentTest driven development vs Behavior driven development
Test driven development vs Behavior driven development
 
Test drive on driven development process
Test drive on driven development processTest drive on driven development process
Test drive on driven development process
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD) A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD)
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven Development
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)
 
PHPUnit - Unit testing
PHPUnit - Unit testingPHPUnit - Unit testing
PHPUnit - Unit testing
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
 
Test Driven Development Powered by LEGO
Test Driven Development Powered by LEGOTest Driven Development Powered by LEGO
Test Driven Development Powered by LEGO
 
Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010
 
Scrum and Test-driven development
Scrum and Test-driven developmentScrum and Test-driven development
Scrum and Test-driven development
 
Tdd in php a brief example
Tdd in php   a brief exampleTdd in php   a brief example
Tdd in php a brief example
 
TDD That Was Easy!
TDD   That Was Easy!TDD   That Was Easy!
TDD That Was Easy!
 
Introduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefIntroduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed Shreef
 

Semelhante a TDD CrashCourse Part2: TDD

Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...mCloud
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentbhochhi
 
Don't let your tests slow you down
Don't let your tests slow you downDon't let your tests slow you down
Don't let your tests slow you downDaniel Irvine
 
Bdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propriBdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propriCommit University
 
Test Driven Development - Tulsa TechFest 2009
Test Driven Development - Tulsa TechFest 2009Test Driven Development - Tulsa TechFest 2009
Test Driven Development - Tulsa TechFest 2009Jason Ragsdale
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference CardSeapine Software
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Danny Preussler
 
Cleaner Code Through Test-Driven Development
Cleaner Code Through Test-Driven DevelopmentCleaner Code Through Test-Driven Development
Cleaner Code Through Test-Driven DevelopmentAll Things Open
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Babul Mirdha
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven DevelopmentJason Ragsdale
 
Test Driven Development - 09/2009
Test Driven Development - 09/2009Test Driven Development - 09/2009
Test Driven Development - 09/2009Jason Ragsdale
 
How BDD enables True CI/CD
How BDD enables True CI/CDHow BDD enables True CI/CD
How BDD enables True CI/CDRoger Turnau
 
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond
 
TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012Pietro Di Bello
 
Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Sakares Saengkaew
 
xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012Justin Gordon
 
Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Vijay Kumbhar
 

Semelhante a TDD CrashCourse Part2: TDD (20)

Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
Ian Cooper webinar for DDD Iran: Kent beck style tdd   seven years afterIan Cooper webinar for DDD Iran: Kent beck style tdd   seven years after
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
 
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Don't let your tests slow you down
Don't let your tests slow you downDon't let your tests slow you down
Don't let your tests slow you down
 
Bdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propriBdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propri
 
Test Driven Development - Tulsa TechFest 2009
Test Driven Development - Tulsa TechFest 2009Test Driven Development - Tulsa TechFest 2009
Test Driven Development - Tulsa TechFest 2009
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference Card
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
 
Cleaner Code Through Test-Driven Development
Cleaner Code Through Test-Driven DevelopmentCleaner Code Through Test-Driven Development
Cleaner Code Through Test-Driven Development
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test Driven Development - 09/2009
Test Driven Development - 09/2009Test Driven Development - 09/2009
Test Driven Development - 09/2009
 
How BDD enables True CI/CD
How BDD enables True CI/CDHow BDD enables True CI/CD
How BDD enables True CI/CD
 
tem7
tem7tem7
tem7
 
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
 
TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012
 
Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd
 
xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012
 
Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy
 

Mais de David Rodenas

TDD CrashCourse Part1: Testing
TDD CrashCourse Part1: TestingTDD CrashCourse Part1: Testing
TDD CrashCourse Part1: TestingDavid Rodenas
 
TDD CrashCourse Part3: TDD Techniques
TDD CrashCourse Part3: TDD TechniquesTDD CrashCourse Part3: TDD Techniques
TDD CrashCourse Part3: TDD TechniquesDavid Rodenas
 
TDD CrashCourse Part5: Testing Techniques
TDD CrashCourse Part5: Testing TechniquesTDD CrashCourse Part5: Testing Techniques
TDD CrashCourse Part5: Testing TechniquesDavid Rodenas
 
TDD CrashCourse Part4: Improving Testing
TDD CrashCourse Part4: Improving TestingTDD CrashCourse Part4: Improving Testing
TDD CrashCourse Part4: Improving TestingDavid Rodenas
 
Be professional: We Rule the World
Be professional: We Rule the WorldBe professional: We Rule the World
Be professional: We Rule the WorldDavid Rodenas
 
ES3-2020-P3 TDD Calculator
ES3-2020-P3 TDD CalculatorES3-2020-P3 TDD Calculator
ES3-2020-P3 TDD CalculatorDavid Rodenas
 
ES3-2020-P2 Bowling Game Kata
ES3-2020-P2 Bowling Game KataES3-2020-P2 Bowling Game Kata
ES3-2020-P2 Bowling Game KataDavid Rodenas
 
ES3-2020-07 Testing techniques
ES3-2020-07 Testing techniquesES3-2020-07 Testing techniques
ES3-2020-07 Testing techniquesDavid Rodenas
 
ES3-2020-06 Test Driven Development (TDD)
ES3-2020-06 Test Driven Development (TDD)ES3-2020-06 Test Driven Development (TDD)
ES3-2020-06 Test Driven Development (TDD)David Rodenas
 
Testing, Learning and Professionalism — 20171214
Testing, Learning and Professionalism — 20171214Testing, Learning and Professionalism — 20171214
Testing, Learning and Professionalism — 20171214David Rodenas
 
ReactJS for Programmers
ReactJS for ProgrammersReactJS for Programmers
ReactJS for ProgrammersDavid Rodenas
 
Redux for ReactJS Programmers
Redux for ReactJS ProgrammersRedux for ReactJS Programmers
Redux for ReactJS ProgrammersDavid Rodenas
 
Basic Tutorial of React for Programmers
Basic Tutorial of React for ProgrammersBasic Tutorial of React for Programmers
Basic Tutorial of React for ProgrammersDavid Rodenas
 
Introduction to web programming for java and c# programmers by @drpicox
Introduction to web programming for java and c# programmers by @drpicoxIntroduction to web programming for java and c# programmers by @drpicox
Introduction to web programming for java and c# programmers by @drpicoxDavid Rodenas
 
From high school to university and work
From high school to university and workFrom high school to university and work
From high school to university and workDavid Rodenas
 
Modules in angular 2.0 beta.1
Modules in angular 2.0 beta.1Modules in angular 2.0 beta.1
Modules in angular 2.0 beta.1David Rodenas
 
Freelance i Enginyeria
Freelance i EnginyeriaFreelance i Enginyeria
Freelance i EnginyeriaDavid Rodenas
 

Mais de David Rodenas (20)

TDD CrashCourse Part1: Testing
TDD CrashCourse Part1: TestingTDD CrashCourse Part1: Testing
TDD CrashCourse Part1: Testing
 
TDD CrashCourse Part3: TDD Techniques
TDD CrashCourse Part3: TDD TechniquesTDD CrashCourse Part3: TDD Techniques
TDD CrashCourse Part3: TDD Techniques
 
TDD CrashCourse Part5: Testing Techniques
TDD CrashCourse Part5: Testing TechniquesTDD CrashCourse Part5: Testing Techniques
TDD CrashCourse Part5: Testing Techniques
 
TDD CrashCourse Part4: Improving Testing
TDD CrashCourse Part4: Improving TestingTDD CrashCourse Part4: Improving Testing
TDD CrashCourse Part4: Improving Testing
 
Be professional: We Rule the World
Be professional: We Rule the WorldBe professional: We Rule the World
Be professional: We Rule the World
 
ES3-2020-P3 TDD Calculator
ES3-2020-P3 TDD CalculatorES3-2020-P3 TDD Calculator
ES3-2020-P3 TDD Calculator
 
ES3-2020-P2 Bowling Game Kata
ES3-2020-P2 Bowling Game KataES3-2020-P2 Bowling Game Kata
ES3-2020-P2 Bowling Game Kata
 
ES3-2020-07 Testing techniques
ES3-2020-07 Testing techniquesES3-2020-07 Testing techniques
ES3-2020-07 Testing techniques
 
ES3-2020-06 Test Driven Development (TDD)
ES3-2020-06 Test Driven Development (TDD)ES3-2020-06 Test Driven Development (TDD)
ES3-2020-06 Test Driven Development (TDD)
 
ES3-2020-05 Testing
ES3-2020-05 TestingES3-2020-05 Testing
ES3-2020-05 Testing
 
Testing, Learning and Professionalism — 20171214
Testing, Learning and Professionalism — 20171214Testing, Learning and Professionalism — 20171214
Testing, Learning and Professionalism — 20171214
 
ReactJS for Programmers
ReactJS for ProgrammersReactJS for Programmers
ReactJS for Programmers
 
Vespres
VespresVespres
Vespres
 
Faster web pages
Faster web pagesFaster web pages
Faster web pages
 
Redux for ReactJS Programmers
Redux for ReactJS ProgrammersRedux for ReactJS Programmers
Redux for ReactJS Programmers
 
Basic Tutorial of React for Programmers
Basic Tutorial of React for ProgrammersBasic Tutorial of React for Programmers
Basic Tutorial of React for Programmers
 
Introduction to web programming for java and c# programmers by @drpicox
Introduction to web programming for java and c# programmers by @drpicoxIntroduction to web programming for java and c# programmers by @drpicox
Introduction to web programming for java and c# programmers by @drpicox
 
From high school to university and work
From high school to university and workFrom high school to university and work
From high school to university and work
 
Modules in angular 2.0 beta.1
Modules in angular 2.0 beta.1Modules in angular 2.0 beta.1
Modules in angular 2.0 beta.1
 
Freelance i Enginyeria
Freelance i EnginyeriaFreelance i Enginyeria
Freelance i Enginyeria
 

Último

The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfkalichargn70th171
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 

Último (20)

The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 

TDD CrashCourse Part2: TDD

  • 1. 02 BARCELONA David Ródenas, PhD TDD Course TEST DRIVEN DEVELOPMENT
  • 2. @drpicox Breaking myths and understanding why Software Values The Triangle △ Example Fixing Code Smells Discipline The Rules TDD is Dead TDD vs. BDD Tips for adoption TEST DRIVEN DEVELOPMENT
  • 4. @drpicox @drpicox QUIZ 4 TDD — SOFTWARE VALUE WHICH IS THE MAIN SOFTWARE VALUE?
  • 5. @drpicox @drpicox PRIMARY VALUE The ability to tolerate and facilitate change SOFTWARE VALUES 5 TDD — SOFTWARE VALUES SECONDARY VALUE The current software meets the current needs of the current user
  • 6. @drpicox @drpicox ARE YOU A FORTUNE TELLER? 6 TDD — SOFTWARE VALUES There are no oracles.
  • 7. @drpicox @drpicox Rigidity Dif f icult to change Fragility Changes breaks unrelated features Immobility Cannot extract/reuse a module Needless complexity Too much anticipation CODE SMELLS 7 TDD — SOFTWARE VALUES
  • 9. @drpicox @drpicox WATERFALL DESIGN 9 TDD — FIXING CODE SMELLS Code The Great Refactor Upfront Design Code Code Code Code time speed
  • 11. @drpicox @drpicox DESIGN YOUR WAY 11 TDD — FIXING CODE SMELLS Refactor Code Code Code Code Refactor Code Refactor Code Code Code Refactor time speed THE AGILE
  • 12. @drpicox @drpicox How we know that we break no feature? BUT REFACTOR IS DANGEROUS 12 TDD — FIXING CODE SMELLS
  • 13. @drpicox @drpicox LEVERAGE ON TESTS 13 TDD — FIXING CODE SMELLS CODE TESTS *we assume that we have good tests
  • 14. @drpicox @drpicox Tests do also suffer from code smells If a test is fragile, we cannot leverage on them to refactor code BUT... 14 TDD — FIXING CODE SMELLS Refactor TESTS ?
  • 16. @drpicox —Merriam-Webster dictionary "DISCIPLINE: TRAINING THAT CORRECTS, MOLDS, OR PERFECTS THE MENTAL FACULTIES OR MORAL CHARACTER" TDD — DISCIPLINE 16
  • 17. @drpicox @drpicox Accounting is a discipline that is in charge of studying, measuring and analyzing the assets and f inancial and economic situation of a company or organization, in order to facilitate decision-making within it and external control, presenting the information , previously registered, in a systematic and useful way for the different interested parties. 
 ACCOUNTING 17 TDD — DISCIPLINE —Wikipedia Double-entry bookkeeping In 70 AD Plinius the Elder described the structure of the "Tabulae Rationum". Account Debit Credit Furniture $1,500 Cash $1,500 $1,500 $1,500
  • 18. @drpicox @drpicox 1. You are not allowed to write any production code unless it is to make a failing unit test pass. 2. You are not allowed to write any more of a unit test than is suf f icient to fail; and compilation failures are failures. 3. You are not allowed to write any more production code than is suf f icient to pass the one failing unit test. PROGRAMMING 18 TDD — DISCIPLINE
  • 20. @drpicox @drpicox It is a discipline of programming about coding about testing and about design 
 (in the form of refactoring) WHAT IS TDD? 20 TDD — THE RULES
  • 21. @drpicox @drpicox The steps are the following: write a “single” test describing an aspect of the program run the test, which should fail because the program lacks that feature write “just enough” code, the simplest possible, to make the test pass “refactor” the code until it conforms to the simplicity criteria repeat, “accumulating” unit tests over time HOW FOLLOW THE RULES? 21 TDD — THE RULES Write a Test ✘ Test Fails ✔ Test Passes Write the Code ✔ Test Passes Clean Code and Tests
  • 22. @drpicox @drpicox WHO TESTS THE TEST? 22 TDD — THE RULES Write a Test ✘ Test Fails ✔ Test Passes Write the Code ✔ Test Passes Clean Code and Tests We know that code works because tests. We know that clean broke nothing because tests. It the test failing who tests the test. TDD SILVER RULE You shall make tests fail f irst
  • 23. @drpicox @drpicox ? CODE HOW TO REFACTOR TESTS? 23 TDD — THE RULES TESTS
  • 24. @drpicox @drpicox TDD ESSENTIAL RULES 24 TDD — THE RULES TDD SILVER RULE You shall make tests fail f irst TDD GOLDEN RULE You shall iterate fast
  • 25. @drpicox @drpicox TDD ESSENTIAL RULES 25 TDD — THE RULES TDD GOLDEN RULE You shall iterate fast Write a Test ✘ Test Fails ✔ Test Passes Write the Code ✔ Test Passes Clean Code and Tests 30s loop
  • 26. @drpicox @drpicox DESIGN YOUR WAY 26 TDD — FIXING CODE SMELLS Refactor Code time speed Refactor Code Refactor Code Refactor Code Refactor Code Refactor Code Refactor Code Refactor Code THE TDD
  • 27. @drpicox TDD IS DEAD TDD — IS DEAD 27
  • 28. @drpicox @drpicox https://www.infoq.com/news/2014/06/tdd-dead-controversy/ KILLING TDD 28 TDD — IS DEAD David Heinemeier Hansson, Ruby on Rails author and founder of Basecamp gave the opening keynote at Railsconf 2014 in which he challenged the value of TDD as it is often implemented. «Then I'd try test-first for a few weeks, only to drop it again when it started 
 hurting my designs.» «"Code that's hard to test in isolation is poorly designed", goes a common TDD maxim. Isolation meaning free of dependent context and separated from collaborators […] The prevalent definition of "unit" in unit testing (though not everyone agrees with this).» «Such damage is defined as changes to your code that either facilitates a) easier test- first, b) speedy tests, or c) unit tests, but does so by harming the clarity of the code through […]. Code that is warped out of shape solely to accomodate testing objectives.»
  • 29. @drpicox @drpicox https://wiki.c2.com/?DeveloperTest THE REAL TDD 29 TDD — IS DEAD Ward Cunningham, inventor of Wiki, writer of the Agile Manifesto, inventor of the test runner and run docs as test, co-inventor of XP and TDD, inventor of the technical debt concept. «A DeveloperTest is the correct name for what the industry generally calls a UnitTest. It is a test written for developers, as distinct from an AcceptanceTest or CustomerTest, written for the OnsiteCustomers.» «Under the strict definition, for QA purposes, the failure of a UnitTest implicates only one unit. You know exactly where to search to find the bug.» «TestDrivenDevelopment produces DeveloperTests. The failure of a test case implicates only the developer’s most recent edit.»
  • 30. @drpicox @drpicox BOTH AXIS 30 TDD — IS DEAD +legible -legible legibility DEVELOPER TEST ACCEPTANCE TEST UNIT TEST E2E TEST con f idence -con f idence +con f idence INTEGRATED TEST Best compromise Double Con f idence It does what code says Everyone on same page Developers fail with TDD because of they use the wrong level of abstraction
  • 31. @drpicox @drpicox THE ELEPHANT IN THE ROOM 31 TDD — IS DEAD XY-1516 The new valuable feature 5 IT2 IT1 IT3 IT4 XY- 
 1516 XY- 
 1517 XY- 
 1518 AA- 
 1121 AA- 
 0987 AA- 
 1122 Last day of IT3 EV-1516 is not yet f inished, why is that? Well, the PR is stopped, it requires cleaning Today ends the iteration, and there are dependencies Approve that and do the cleaning later. Ok. Keep technical excellence at all times Technical debt charges interest every feature No one wants a big refactor SAFe is Agile Story points are estimates, not time boxes Never ever and ever ask for termination Ask for new estimates instead, and replan Continuous attention to technical excellence and good design enhances agility. https://agilemanifesto.org * Never congratulate a team for
  • 32.
  • 33. ff erent primary value «I had a problem. While using and teaching agile practices like test-driven development (TDD) [...], I kept coming across the same confusion and misunderstandings. Programmers wanted to know where to start, what to test and what not to test, how much to test in one go, what to call their tests, and how to understand why a test fails.» «I remember thinking “If only someone had told me that!” far more often than I thought “Wow, a door has opened.” I decided it must be possible to present TDD in a way that gets straight to the good stuff and avoids all the pitfalls.» «At this point, I had a framework that helped me understand – and more importantly, explain – how TDD works and an approach that avoided all the pitfalls I had encountered.» If we could develop a consistent vocabulary for analysts, testers, developers, and the business, then we would be well on the way to eliminating some of the ambiguity and miscommunication that occur when technical people talk to business people.
  • 34. @drpicox @drpicox TDD SILVER RULE You shall make tests fail f irst TDD GOLDEN RULE You shall iterate fast BDD
  • 35. @drpicox @drpicox TDD SILVER RULE You shall make tests fail f irst BDD GOLDEN RULE You shall have a common language TDD 35 TDD — VS. TDD TDD SILVER RULE You shall make tests fail f irst TDD GOLDEN RULE You shall iterate fast BDD
  • 36. @drpicox @drpicox THE PATH 36 TDD — VS. BDD Acceptance Test TDD BDD Developer Test Feature: Is it Friday yet? Everybody wants to know when it's Friday Scenario: Sunday isn't Friday Given today is Sunday When I ask whether it's Friday yet Then I should be told "Nope" import { isItFridayYet } from '../' test('Sunday isn't Friday', () => { const today = new Date('Sunday 8/16/2020'); const answer = isItFridayYet(today); expect(answer).toBe(false); }); PO QA Dev Dev
  • 37. @drpicox @drpicox BOTH AXIS 37 TDD — VS. BDD +legible -legible legibility DEVELOPER TEST ACCEPTANCE TEST UNIT TEST E2E TEST con f idence -con f idence +con f idence INTEGRATED TEST Fast enough for TDD Create suits and focus Usually too slow for TDD TDD BDD
  • 39. @drpicox @drpicox Focus the most important suit and run every minute Run all developer tests at least every two hours RUN TESTS FREQUENTLY 39 TDD — TIPS FOR ADOPTION
  • 40. @drpicox @drpicox The code is who teaches to the new members Testing code should be cleaner than production code CODE IS YOUR FRIEND 40 TDD — TIPS FOR ADOPTION
  • 41. @drpicox @drpicox Once a developer needs to run the application to develop, TDD is over. MANUAL TESTING IS YOUR ENEMY 41 TDD — TIPS FOR ADOPTION
  • 42. @drpicox @drpicox Think in Business Value. BDD helps to TDD and vice-versa. MOSTLY INTEGRATED 42 TDD — TIPS FOR ADOPTION Unit Test
  • 44. @drpicox @drpicox MOSTLY INTEGRATED 44 TDD — TIPS FOR ADOPTION The car lights the street