@AgileChrisYYC
How to Fail your
TDD Rollout
A Train Wreck Story
Chris Edwards, Dev Manager
@ Solium
@AgileChrisYYC
@AgileChrisYYC
Chris Edwards
Software Development
Manager @ Solium
@AgileChrisYYC
@AgileChrisYYC
How to FAIL your TDD Rollout
@AgileChrisYYC
@AgileChrisYYC
How to FAIL your TDD Rollout
@AgileChrisYYC
How to FAIL your TDD Rollout
Poorly Execute
@AgileChrisYYC
How to FAIL your TDD Rollout
Poorly Execute
building an engineering culture
@AgileChrisYYC
Background
• Approx 50 QA + Devs
• Brand new to Agile
• C++ Desktop software
• No culture of unit testing
• Previous job (not Solium)
And now
you’re agile!
@AgileChrisYYC
Pre-Agile Release Cycle
• 3 Month release cycle
• 2 Months of development
• 1 week feature freeze (bug fixes only)
• 1 month code freeze (critical fixes only)
@AgileChrisYYC
Agile Release Cycle
• 2 week sprints
• Testing part of Definition of Done
• Cultural resistance to eliminating 1 month code-
freeze
@AgileChrisYYC
@AgileChrisYYC
Our Solution:
• Just automate our manual testing!
@AgileChrisYYC
Our Solution:
• With automated UI tests!!!
@AgileChrisYYC
@AgileChrisYYC
I want to bring
something to
your attention
“In God we Trust, all
others must bring data”
~W. Edwards Deming
@AgileChrisYYC
@AgileChrisYYC
At our current pace, it would take 2.5
years to automate the backlog of test
cases
QA spent 50%-75% of their time
maintaining the existing tests
@AgileChrisYYC
@AgileChrisYYC
“It is difficult to get a man to understand
something, when his salary depends on
his not understanding it.”
~Upton Sinclair
@AgileChrisYYC
@AgileChrisYYC
The Promise of TDD
• Fewer bugs
• Faster detection of bugs
• Better designs & cleaner code
• Fearless refactoring
There is a
better way
@AgileChrisYYC
TDD is ALIVE
This is the greatest thing ever!
Why aren’t we doing this already?
This is so much better!
We should have been doing this years ago
Where have you been all my life!
@AgileChrisYYC
TDD is dead!
That’ll never work here!
Our code is too old!
Its just a fad!
We don’t have time for that!
The business will never agree to this!
@AgileChrisYYC
Infrastructure!
• Setup Google Test and GMock
• Integrated tests with existing builds (Currently take
2 hours)
• Created faster builds in Jenkins that take < 20
minutes
@AgileChrisYYC
Learning
• Presentations on TDD internally
• Self-directed learning module
• Teaches basics of red-green refactoring
TDD Community
of Practice
FFWD 6 Months
TDD Adoption:
10-15%
Defect Rate: Minimal
Change
Code Freeze: Still 1
month
Challenge 1:
“We don’t have time to
learn”
Challenge 2:
“We don’t have time to in
our sprint”
Challenge 3:
“The business will never
agree to this”
Challenge 4:
“Works great for new code,
but we work in legacy code”
@AgileChrisYYC
I have a hypothesis
@AgileChrisYYC
TDD Has a steep
learning curve
@AgileChrisYYC
The benefits of TDD
won’t be seen right
away
@AgileChrisYYC
If people give it an
honest chance they’ll
see the benefits
@AgileChrisYYC
Let’s ask everyone to
give it a try for a
while
TDD Mandate:
Everyone must do TDD
Clarification:
Everyone must write at least
one test on every story or bug
Any predictions?
TDD Adoption improved!
Sort of…
Problem:
Some people take things
a little too literally
Some people take
things a little too literally
@AgileChrisYYC
[Test]
void TestFunction()
{
var subject = new Class();
subject->Func();
Assert( true );
}
Problem:
Some people don’t
exercise pragmatism
A storms a brewin’
@AgileChrisYYC
The Dogmatists The Pragmatists
Everyone should be doing TDD TDD is just a fad
Just try it! This will slow us down
You have to give it a chance You’re just drinking
the Kool-Aid
Let’s Pause
@AgileChrisYYC
At Your Tables
• What went wrong here?
• What could we have done differently?
• Where have you seen successful change happen
that was handled differently?
@AgileChrisYYC
On what you can
control must you
focus. Follow the
rest will.
@AgileChrisYYC
On what you can
control must you
focus. Follow the
rest will.
@AgileChrisYYC
On what you can
control must you
focus. Follow the
rest will.
FFWD a few months:
Team is much more
productive
FFWD a few more months:
Team has grown, splits in
half
Results after 2 years:
Measurable improvement
in code quality
Let’s Pause Again
@AgileChrisYYC
At Your Tables
• What can we do to repeat this success?
@AgileChrisYYC
TDD is Not the Goal
@AgileChrisYYC
http://www.dfe.com/photos/openvsclosedloop.jpg
“If you have a test suite that you trust so
much that you are willing to deploy the
system based solely on those tests passing;
and if that test suite can be executed in
seconds, or minutes, then you can quickly
and easily clean the code without fear.”
~Robert C. Martin
“If you have a test suite that you trust so
much that you are willing to deploy the
system based solely on those tests passing;
and if that test suite can be executed in
seconds, or minutes, then you can quickly
and easily clean the code without fear.”
~Robert C. Martin
“If you have a test suite that you trust so
much that you are willing to deploy the
system based solely on those tests passing;
and if that test suite can be executed in
seconds, or minutes, then you can quickly
and easily clean the code without fear.”
~Robert C. Martin
Enable the Innovators,
Ignore the Laggards
Encourage
Experimentation -
Celebrate Failure
Get a Doc Brown!
Build Connection
Allocate Time for
Learning
Dynamic Reteaming
@AgileChrisYYC
Summary
• Communicate goals, not methods
• Enable the innovators, ignore the laggards
• Encourage experimentation
• Get a “Doc Brown”
• Create connection - Re-team if you need to
@AgileChrisYYC
Solium is Hiring
https://solium.com/careers/
@AgileChrisYYC
Thank You!
• @AgileChrisYYC
• chris.edwards@solium.com
• www.chrisandseanagile.com
Please Fill in Speaker Feedback!

20170807 - How to Fail Your TDD Rollout - A Train Wreck Story