Test Driven Testing – Test only enough to satisfy the objective

Test Driven Testing

Think Test Driven Development only applies to developers? This series will explore how testers can use the aspects of TDD to help structure their testing to enable the same tight feedback loop and positive outcomes that TDD provides.

 

The first law of Test Driven Testing challenges a tester to not begin testing until they have a conscientious outcome in mind. Clarity of intent, is not a guarantee that the work we are trying to accomplish isn't overly ambitious.

The second of the three simple laws of TDD helps to keep the developer inside a tight feedback loop.

2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.

TDD is a discipline that on the individual developer level is a microcosm of the transition from waterfall to agile process. We don't want to let what we think we already know drive our actions. We don't dive into attempting to solve complex problems. We want to work small and iterate, letting the feedback cycle propel us forward.

When testers are given a new feature to test, it's like arriving in a new place, knowing you need to get somewhere but your only tool is the old wrinkled map in the glove compartment of the rental car.

Staring at the map, you are trying to figure out where you are, where you want to be and how you might get there. You are forced to make decisions when you know the least. When you hit any obstacle, you hit a traffic, see that construction has closed the roads or maybe a detour leaves you off your intended route, you may be forced to re-evaluate your entire approach.

Narrowly Focused Intentions

Once you start executing on a plan or strategy, it's easy to for the original goal to slip out of focus and be replaced with goal of sticking to the plan we spent so long creating.

It's ony natural plans provide a sense of control a feeling of certainty, everyone is more comfortable knowing the work is all planned out.

What we see time and time again is that things don't go according to plan. At a project level, teams work in sprints because the shorter term the commitments the less risk there is that the ground underfoot will shift. It's easier to guarantee business priority won't shift for 2 weeks than it is for 2 months.

We want to strive to scale that same reasoning down from a project level consideration to an individual task level concern. The moment we decide on an entire route, human nature will kick in and the sunk cost fallacy may drive us to continue following a plan even as we start to recognize its failings or limitations.

Instead of planning our complete route up front, what if instead we decided to approach the journey as a series distance intervals resulting in arriving at the destination. We could have an optimal route in mind, but the plan would involve pulling over at each distance interval to evaluate our course. We replace a plan and the more rigid psychological baggage that goes along with it with a strategy accounts for the inevitability of disruption.

Second Law of Test Driven Testing

2. Test only enough to satisfy the objective

Even as formal test plans have gone out of fashion, its easy to fall into approaching testing in a destination oriented fashion. Just enabling the shipping of releases, introduces a bias that can be hard to overcome while testing and continues to enable the waterfall notion of testers as gatekeepers. We want to structure testing in such a manner that the information harvested yields the most feedback about the system under test.

Joy comes in sips, not gulps

- Sharon Draper

People tend to gulp things when they are in a rush or aren't in a position to savor something. Time is a precious resource, and while testers need to be mindful of time spent testing, it shouldn't be an activity approached from a mindset of scarcity. Rather than rush, sip your way through testing.

Think about when you have a really good cup of coffee, wine or whiskey. While you are waiting for it, you start building it up the experience in your mind. When it arrives you hold the cup or glass in your hands, before you bring it to your lips you are anticipating it's qualities, how it will taste, how it will make you feel.

You don't gulp the good stuff, you sip and revel in it. Sips are iterations, its the same beverage but in each sip you are searching, looking to find out more. Did you catch a note of something, yum better take another to be sure.

Make your objectives sips. Sipping introduces a pause, which according to Michael Bolton provides:

a little breathing space in which questions oriented towards critical thinking have time to come to mind.

Stay focused on your objective and savor it. Let each objective breathe, if you notice some behavior of interest take note and move on.

Deep Work

We want to drive our efforts to breaking down work into chunks that we can accomplish inside a distraction free time-box. The more we can structure testing efforts using effective time management the greater insight and productivity you can expect.

To produce at your peak level you need to work for extended periods with full concentration on a single task free from distraction.

- Cal Newport, Deep Work: Rules for Focused Success in a Distracted World