Test-driven development (TDD) can benefit both business and development teams. TDD involves writing automated tests before code, which leads to cleaner code, more reliable products, and increased developer skills and satisfaction. Studies show TDD can reduce pre-release defects by 40-90% and initial development time by 15-35%, while increasing code quality. However, fully adopting TDD can be challenging due to issues like increased perceived time investment and breaking old habits. Overall, TDD allows for flexibility, customer satisfaction, risk reduction, efficient code, and stronger teamwork.
1. Alan Taylor Scrum Master and Agile Coach
Test Driven Development
How it benefits business and teams alike
START
Red
(Fail)
Green
(Pass)
Refactor
Team
Improved
Skills
Clean Code
Satisfaction
Trust
Risk
Management
Business
Customers
Reliable & Robust
Efficiency
Speed
Quality
2.
3. What is Broken?
DARK SCRUM”… agile that's just the name,
but none of the practices and
values in place”
- Martin Fowler
Continuous attention to technical
excellence and good design
enhances agility.
Agile Manifesto Principle #9
4. DELIVERING
Other organizations require the minimal defects and
high productivity that allows them to ship on cadence
and receive the market boost that comes from
consistently Delivering when the market demands.
The Agile Fluency Model
CHART YOUR AGILE PATHWAY
Sources:
https://www.agilefluency.org/model.php
https://martinfowler.com/articles/agileFluency/agile-fluency-model-v2-full-landscape-page.pdf
5. Plan and prepare carefully and thoughtfully
before taking action
Practical Example
6. Practical Example
3 . Consider
Options &
Way Forward
…
The Build Fridge
2. Test First – If I open the door, will it open IF there was a
cupboard to the side
Test first
Fridge
4 . Testing the door – all is good
CupboardFridge
Yay!
1. Current Situation – No cupboard next to the fridge
Blank SpaceFridge
7. Developer Process
Write a Test
Write Code
Run
all
Tests
Refactor -
Clean up
code
Test
Succeeds
Test
Fails Test(s)
Fails
Check
if the Test
Fails
All Tests
Succeed
Benefits Include:
• Better quality code
• Simpler code with better design
• Automated test suite
• Massive risk reduction
• Frequent positive reinforcement
• Ability to release enhancements quicker
10. Efficiency / Development Team Productivity
Pre-Release Defect Density
40% - 90%
reduction
Initial Development Time
15% - 35%
increase
Cost of Change
12. The Customer Kano Model
Image: Craig Brown
Customers Want:
Differentiating
Features
Innovation
Stable Products
13. Compelling Evidence
Costs
• 15 – 35 % increased initial dev time
Benefits
• 40% – 90% reduction in pre-production defects
• 10% – 20% reduced SIT/UAT
• Reduction of production defect debugging (from 10% – 30%)
• Decreases code complexity by about 30%
• Accelerated delivery of innovation
• Avoid ever growing integration test cycle
• Avoid cost of retrospective addition of tests
• Trust between customers, business & dev team
Data Sources:
http://biblio.gdinwiddie.com/biblio/StudiesOfTestDrivenDevelopment
https://blog.takipi.com/5-ways-developers-waste-more-than-20-of-their-work-week/
And so why aren’t we doing it ...
14. What Holds Us Back Then?
Push Back
• Increased delay in ROI
• It won’t help!
Investment J Curve
Return$
Investment
Period
Payback
Period
Profit Period
Time
15. Perhaps Not a Viable Option?
Prototype
Code
Proof of
Concept
Short Term
Initiative
16. The Team Gains
Focus
Fast feedback & positive reinforcement
Ability to experiment
To learn
To set expectations based on the learnings
Freedom to refactor without fear
Reduced Silos
Satisfaction in knowing safe outcomes
17. Team TDD Adoption Blockers
https://www.linkedin.com/pulse/thanks-we-too-busy-daniel-white/