Skip to main content

Testing as War?

We are fighting an invincible opponent. The legions of bugs in our software far outnumber our attempts to find them all. Even the simplest of software releases, inevitably contains a 5th column of hidden pre-existing bugs or quirks that combined with our changes could strike at any time. The question we need to understand as testers is, how can we win? or at least: not lose this battle?

Military examples and analogies can be useful in software testing, and not just those in reconnaissance. For example: the Millennium Challenge. This pre-gulf war 2 military exercise pitted two forces against one another, in the middle-east. In summary the modern US military was fighting a rogue element in a smaller country. The vast resources of the western power should of have faced few problems. But in fact the former US general playing the role of the 'Rogue nation' trounced the western forces in a devastating blow that saw several warships sunk.

How did the 'rogue' general do so well? His tactic was to think asymmetrically. Like actual organisations in such situations he used the principles of asymmetric warfare. He played to his strengths rather than to those of his opponent. Rather than using radios, which would be eavesdropped, he used couriers and signal-lights. Rather than try and communicate directly with troops, controlling every move as part of a strict plan, he gave his players autonomy.

We can't usually win move for move with software programmers and bugs. The idea of solving 'testing' by trying to match each feature with a set of pre-defined tests, is like the rogue-general above deciding to build his own carrier fleet. Those features are each complex and capable of working and failing in a myriad of ways. The tester needs to acknowledge his skills and weaknesses, and use tools such as automation to help where it can.

Once you accept the asymmetric warfare approach, there are tactics that can be employed to help you test. Concepts such as:

Reconnaissance by fire where you investigate multiple possible features, without necessarily having cause to. If you find evidence or anomaly - you can then focus more narrowly.

When might I use this? If you have some time to test, but not enough for a more exhaustive approach, this technique can help catch issues that would be missed if you only focused on the highest risk areas.

Swarming or Saturation is another, deploy a large number of people to test a given system at the same time. You might also find it useful to run a load-testing tool at the same time, adding to the affect of 'many users'. Another trick is to use a clients existing test automation, to add the effect of more users. The aim here is not to use the test-automation for its intended purpose, but rather merely to simulate load closer too and exceeding expected load. As such the negative aspects of the customers test-automation; high maintenance, brittleness, flakiness and irrelevance etc are less of a concern. We do not care much for the PASS/FAIL results, but rather how the system behaved while receiving 'the attack'.

When might I use this? If you want more coverage of parallel usage scenarios, rather than single user situations. If your customer complains of strange issues that occur in 'live' but don't seem to be present in the quiet times [When they have time to investigate] or are not visible on test systems. By periodically focusing your testers on a specific area, concurrently, you can help counter-act the affects of having to spread a few testers across a large system.


Popular posts from this blog

Why you might need testers

I remember teaching my son to ride his bike. No, Strike that, Helping him to learn to ride his bike. It’s that way round – if we are honest – he was changing his brain so it could adapt to the mechanism and behaviour of the bike. I was just holding the bike, pushing and showering him with praise and tips.
If he fell, I didn’t and couldn’t change the way he was riding the bike. I suggested things, rubbed his sore knee and pointed out that he had just cycled more in that last attempt – than he had ever managed before - Son this is working, you’re getting it.
I had help of course, Gravity being one. When he lost balance, it hurt. Not a lot, but enough for his brain to get the feedback it needed to rewire a few neurons. If the mistakes were subtler, advice might help – try going faster – that will make the bike less wobbly. The excitement of going faster and better helped rewire a few more neurons.
When we have this sort of immediate feedback we learn quicker, we improve our game. When the f…

Thank you for finding the bug I missed.

Thank you to the colleague/customer/product owner, who found the bug I missed. That oversight, was (at least in part) my mistake. I've been thinking about what happened and what that means to me and my team.

I'm happy you told me about the issue you found, because you...

1) Opened my eyes to a situation I'd never have thought to investigate.

2) Gave me another item for my checklist of things to check in future.

3) Made me remember, that we are never done testing.

4) Are never sure if the application 'works' well enough.

5) Reminded me to explore more and build less.

6) To request that we may wish to assign more time to finding these issues.

7) Let me experience the hindsight bias, so that the edge-case now seems obvious!

Being a square keeps you from going around in circles.

After a weary few hours sorting through, re-running and manually double checking the "automated test" results, the team decide they need to "run the tests again!", that's a problem to the team. Why? because they are too slow. The 'test' runs take too long and they won't have the results until tomorrow.
How does our team intend to fix the problem? ... make the tests run faster. Maybe use a new framework, get better hardware or some other cool trick. The team get busy, update the test tools and soon find them selves in a similar position. Now of course they need to rewrite them in language X or using a new [A-Z]+DD methodology. I can't believe you are still using technology Z , Luddites!
Updating your tooling, and using a methodology appropriate to your context makes sense and should be factored into your workflow and estimates. But the above approach to solving the problem, starts with the wrong problem. As such, its not likely to find the right ans…