..but Nick. How would you address all this debt we have in our test coverage? We have like 40% code coverage. Tops. And it’s not improving.
Interesting. I also wish for it to be higher. How do you think you could improve that?
I was thinking about maybe adding a tech debt PBI to our backlog. I could estimate the R.O.I, sell it to our PO, maybe get it prioritized next quarter. It would be fun and it could really help us. What do you think?
It’s interesting. Would you be willing to explore different scenarios w/ me?
Sure….
Let’s draw up the current state of affairs.
Let’s suppose the code coverage is evenly spread throughout the app

Suppose your initiative comes to fruition and you manage to improve coverage by 50%. That would bring it up from 40% to 60%.
Enough to bring out the champagne! 🍾

After waiting all this time, business has plenty of new ideas.

You start working on a new feature. You can expect the tested paths for the code affected by the new feature to be roughly ~ 60%

A major improvement over your previous situation correct?
But not quite our target…. Man….How do we get out of this?
Stay with me. Here is an alternative:
You. Pay. Off. Zero. Debt. Up. Front. None. Nada.
What?! But Nick…
Wait. There’s a trick. When PO comes in w/ a new idea, you cover each small area of code you are about to change via characterization tests JUST PRIOR to working on that part of a new feature…
Won’t that delay delivering the feature? Increase the estimate?
It depends. But if it does, probably not by much given the benefits of the newly added tests on preventing regressions.Also, these may give you the required confidence to make the adequate structure changes that make the new feature easier to introduce.
Right.
Now after the introduction of the change, things look a bit like this

As time goes, your code coverage map would eventually look a little something like this.

And this comes w/ the added benefits of not having to negotiate, plan & estimate the debt.
It also prevents the need for you to try and find a crystal ball to plan the future and what code may have to change or not.
Willing to give it a try?
Sure!