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.

Comments

Popular posts from this blog

The gamification of Software Testing

A while back, I sat in on a planning meeting. Many planning meetings slide awkwardly into a sort of ad-hoc technical analysis discussion, and this was no exception. With a little prompting, the team started to draw up what they wanted to build on a whiteboard.

The picture spoke its thousand words, and I could feel that the team now understood what needed to be done. The right questions were being asked, and initial development guesstimates were approaching common sense levels.

The discussion came around to testing, skipping over how they might test the feature, the team focused immediately on how long testing would take.

When probed as to how the testing would be performed? How we might find out what the team did wrong? Confused faces stared back at me. During our ensuing chat, I realised that they had been using BDD scenarios [only] as a metric of what testing needs to be done and when they are ready to ship. (Now I knew why I was hired to help)



There is nothing wrong with checking t…

Manumation, the worst best practice.

There is a pattern I see with many clients, often enough that I sought out a word to describe it: Manumation, A sort of well-meaning automation that usually requires frequent, extensive and expensive intervention to keep it 'working'.

You have probably seen it, the build server that needs a prod and a restart 'when things get a bit busy'. Or a deployment tool that, 'gets confused' and a 'test suite' that just needs another run or three.

The cause can be any number of the usual suspects - a corporate standard tool warped 5 ways to make it fit what your team needs. A one-off script 'that manager' decided was an investment and needed to be re-used... A well-intended attempt to 'automate all the things' that achieved the opposite.

They result in a manually intensive - automated process, where your team is like a character in the movie Metropolis, fighting with levers all day, just to keep the lights on upstairs. Manual-automation, manumatio…

Scatter guns and muskets.

Many, Many years ago I worked at a startup called Lastminute.com (a European online travel company, back when a travel company didn't have to be online). For a while, I worked in what would now be described as a 'DevOps' team. A group of technical people with both programming and operational skills.

I was in a hybrid development/operations role, where I spent my time investigating and remedying production issues using my development, investigative and still nascent testing skills. It was a hectic job working long hours away from home. Finding myself overloaded with work, I quickly learned to be a little ruthless with my time when trying to figure out what was broken and what needed to be fixed.
One skill I picked up, was being able to distinguish whether I was researching a bug or trying to find a new bug. When researching, I would be changing one thing or removing something (etc) and seeing if that made the issue better or worse. When looking for bugs, I'd be casting…