Monthly Archives: March 2017

Why it is a bad idea to have test coverage targets


A lot has previously been written on this topic, but it seems like there is a need for another post in this area. Probably saying the same thing as the other ones.

Test coverage is a negative metric. While a low test coverage is bad it is not certain that a high test coverage is  a good thing. It really depends on the tests. What we are testing and how well the tests are implemented. A 100% test coverage with tests that are all green is not so usable if the tests for instance doesn’t have any assertions. Test coverage tells you if there are parts of the system that are lacking tests. Not how good your tests suite is. A high coverage score might also create a sense of false security, that will prevent a team from doing what’s needed to create a product with good quality.


For a team under pressure it might be tempting to start gaming the system to reach a test coverage target that has been forced upon them. Testing things that are easy to test. Instead of writing tests that are useful, but hard to implement.

So when do we have enough test coverage. According to Martin Fowler it is when we have reached the following state.

  • We have a low fault slip through to production.
  • You are not afraid of changing the code.

Sadly the feeling in your stomach while delivering is not as easy to share with upper management as your test coverage result would be.

Read some of Martin Fowler’s thoughts on this topic here.


Make an impact!

Do you want to know how your work fits in the big picture? Do you want to know how your efforts contribute to make the place you work at successful? Do you want to avoid doing stuff without real business value? If yes, then Impact mapping might be something for you and your team!

Impact mapping is a light weight conversation tool created by Gojko Adzic that is used to connect deliverables to business goals. In his workshop that I attended, he used the underpants stealing gnomes from South Park to illustrate where impact mapping fits.

When the gnomes are asked why they are collecting underpants they say that “Collecting underpants is Phase 1”. As soon as the kids ask them about phase 2 the gnomes answer that phase 3 is profit. They haven’t really figured out how to turn their mountain of underwear into money. The gnomes business case described with gifs


Impact mapping is used to connect Phase 3 (A goal) with Phase 1 (a deliverable) with the help of a phase 2 containing actors and their behaviors.

To create an impact map we are asking ourselves four questions. Why? Who? How? and What? The result will be visualized with a mind map.

Why are we doing this? We state a business goal that shall be Specific, Measurable, Achievable, Relevant and Time bound.

What actors can help us to achieve the goal?

How shall our actor’s behavior change so that we can achieve our business goals? The actor’s behavior changes when they are starting and stopping doing things, when they do more of some things and less of some other things. The behavior also changes when actors for instance do things faster or slower etc. etc. etc.

What shall we as an organization or delivery team do to support the necessary impacts? What deliverables shall we produce?

A simple example
Let’s say that we are working for the Swedish Transport Administration. Our goal is that zero persons shall be killed or severely injured in traffic each year. We are going to make an impact map that shall help us to figure out how to achieve this modest goal. I gather a team with people that can help us to answer the questions. Then we are having a conversation in order to create the map.

I have used the tool Mindmup to draw the impact map.


Zero persons shall be killed or severely injured in traffic each year.

The actors we have identified to help us reach our goal is Pedestrians and Drivers.

Drivers are changing their behavior by start obeying the speed limits.

Pedestrians are changing their behavior by start wearing reflectors, stops jaywalking and crosses roads faster.

What can we do as an organization to support the change of behaviors? Using speed cameras that measure the average speed should really help the drivers to slow down.

Every time we deliver something we shall evaluate if the actors behavior is changed and how much. For instance if the ad campaign for wearing reflectors is enough for changing the behavior so that pedestrians always wears reflectors when it is dark, then we don’t have to give away free reflectors and write a theme song. That will save us a lot money! Creating deliverables that is not needed is the number one source of waste!

Impact mapping can also be used to reverse engineer long wish lists. Then we start from the other direction and connect what to how to who to why. Features that doesn’t support change to a new desired behavior and connects to a goal shall be thrown away.

Impact maps can be translated to user stories. “In order to start wearing reflectors, as a pedestrian I want free reflectors” “In order to cross the road faster, as a pedestrian I want to go to a fitness camp!” (Ok all stories from the map doesn’t sound really good but that is due to my crappy example, you see the point right? 🙂 )

If you are doing hypothesis driven development then the impact map could be used to specify the assumptions you will validate or falsify with your experiments.

Some reading

The source:

Great book that among other things shows impact mapping in a Lean Startup context.