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

A h̶i̶t̶c̶h̶h̶i̶k̶e̶r̶'s̶ software tester's guide to randomised testing - Part 1

Mostly Harmless, I've talked and written about randomisation as a technique in software testing several times over the last few years. It's great to see people's eyes light up when they grok the concept and its potential. 
The idea that they can create random test data on the fly and pour this into the app step back and see what happens is exciting to people looking to find new blockers on their apps path to reliability.
But it's not long before a cloud appears in their sunny demeanour and they start to conceive of the possible pitfalls. Here are a few tips on how to avert the common apparent blockers. (Part 1) Problem: I've created loads of random numbers as input data, but how will I know the answer the software returns, is correct? - Do I have to re-implement the whole app logic in my test code?
Do you remember going to the fun-fair as a kid? Or maybe you recall taking your kids now as an adult? If so then you no doubt are familiar with the height restriction -…

Software development is in the Doldrums

"Don't get off the boat."

"Seriously, never get off the boat," The instructor said, leaning forward and looking at each of us in turn.

"But surely if it's sinking..." We reply, somewhat confused and slightly incredulous. We've seen Titanic, we think to ourselves, we know how this sea survival stuff works...

"OK" He concedes, If things get really bad, "Get on the life raft if you can step-up from the boat to the life raft".

"But, But... the yacht is like 37ft long, Do we want to wait until that whole boat is lower than the life-raft? When less than 1ft of the yacht is above the surface? Meanwhile all the time the life raft is just there... floating happily alongside."

"Pretty much, yes," he said nodding.


That was about 15 years ago. Not much has changed since. The reasons are manifold. Firstly, the yacht is a decent shelter. The thin plastic of a legal minimum life-raft isn't going to protect you fro…

Betting in Testing

“I’ve completed my testing of this feature, and I think it's ready to ship”
“Are you willing to bet on that?”
No, Don't worry, I’m not going to list various ways you could test the feature better or things you might have forgotten.
Instead, I recommend you to ask yourself that question next time you believe you are finished. 
Why? It might cause you to analyse your belief more critically. We arrive at a decision usually by means of a mixture of emotion, convention and reason. Considering the question of whether the feature and the app are good enough as a bet is likely to make you use a more evidence-based approach.

Why do I think I am done here? Would I bet money/reputation on it? I have a checklist stuck to one of my screens, that I read and contemplate when I get to this point. When you have considered the options, you may decide to check some more things or ship the app. Either could be the right decision.
Then the app fails…
The next day you log on and find that the feature is b…