how 'specification by example' and test-driven development …€¦ · how...
TRANSCRIPT
How Specification by Exampleand Test-Driven-DevelopmentHelp to Avoid Technical Debt
Wolfgang Trumler,Frances Paulisch
Corporate Technology,Germany
Siemens Corporate TechnologyRestricted © Siemens AG 2016
Restricted © Siemens AG 2016October 2016Page 2 Corporate Technology
Can we avoid Technical Debt?
Restricted © Siemens AG 2016October 2016Page 3 Corporate Technology
NO!
Restricted © Siemens AG 2016October 2016Page 4 Corporate Technology
Do we want to avoid Technical Debt?
Restricted © Siemens AG 2016October 2016Page 5 Corporate Technology
It depends!
Restricted © Siemens AG 2016October 2016Page 6 Corporate Technology
Quadrants of Technical Debt by Martin Fowler
“We don't have time todiscuss the requirementsin such a detail.”
"What's that featureall about?"
Restricted © Siemens AG 2016October 2016Page 7 Corporate Technology
How technical debt is introduced
Restricted © Siemens AG 2016October 2016Page 8 Corporate Technology
How to address these issues
Specification by Example
Acceptance Tests
Unit Tests
Restricted © Siemens AG 2016October 2016Page 9 Corporate Technology
Specification by Example
Restricted © Siemens AG 2016October 2016Page 10 Corporate Technology
Specification by Example
Restricted © Siemens AG 2016October 2016Page 11 Corporate Technology
Acceptance Testing with Cucumber
Restricted © Siemens AG 2016October 2016Page 12 Corporate Technology
Unit Testing
Restricted © Siemens AG 2016October 2016Page 13 Corporate Technology
Addressing the Quadrants of Technical Debt
Specificationby Example
Acceptance &Unit Tests
Restricted © Siemens AG 2016October 2016Page 14 Corporate Technology
Defect Rate
Defects / 1k Lines of Code
http://www.mayerdan.com/ruby/2012/11/11/bugs-per-line-of-code-ratio
In-house testing (not completed yet)
• All reported: 7.42
• Related to our component: 4.64
In-house Testing Released Product
Industry Average 15 - 50
MicrosoftApplications 10 – 20 0.5
Cleanroomdevelopment 3 0.1
Restricted © Siemens AG 2016October 2016Page 18 Corporate Technology
The Role of the Architect
RefactorDesignUp-frontDesign
Restricted © Siemens AG 2016October 2016Page 19 Corporate Technology
Summary
We applied• Specification by Example• Acceptance and extensive Unit Testingto avoid technical debt in late phases of the project
Used Defect Rate as performance indicator
Methodology mix worked well for us (very low Defect Rate)
Planning to roll-out on broader scale
Thank you!
Wolfgang TrumlerFrances Paulish
Corporate TechnologyGermany
Thank you