Академический Документы
Профессиональный Документы
Культура Документы
May 2009
TESTER £1.00
Fruit tower topples over injuring tech lead
EXHAUSTIVE
TESTING IS NOT
POSSIBLE
Software Tester decides
Do a search through any of the
software testing forums and I can
guarantee you will find posts from
exhaustive and
consist of the worlds „test‟
„everything‟ „exhaustively‟ „how?‟.
exploratory testing is
Unless the application under test is
incredibly simple or you have an
army of testers and a fistful of
1
Continued from Front Page
So we can check the software meets expected
outcomes which is valid but often doesn‟t tell
us the whole story. We often struggle to write
scripts that explore the application with
information that is relevant, up-to-date and
accurate. This is best left to exploration. And a
good combination of both scripted and
exploratory is a fantastic place to be.
2
One of the ways I try to teach this to my testers is to ask them to imagine being asked to test a pub. Yes. A
pub. What a job.
“Go to your average pub and test each and every single service being offered there”
Wow. Some people hear this and say simple – and off they go. Others think it‟s impossible.
The fact is, it is impossible. The main reason it is impossible is because there is no such thing as an
average pub. But also, what defines a service? What constitutes a pass/fail?
Yet all the time we hear of testers facing these same dilemmas. They have a vast system that does X, Y, Z
but interfaces with A, B and C and is used by D, E and F. How can I test it. I must write thousands of tests
for each permutation. Must have every test in advance.
So I ask my learners to write down a list of no more than 20 of the most important test cases they would
write to test a pub. And here‟s the pretty average list I get back.
1. We could write tests for each beer, cider and lager on offer.
2. We could write tests for each wine on offer.
3. We could write tests for each soft drink on offer.
4. We could write tests for each spirit on offer.
5. We could write tests for each alco-pop on offer.
6. We could write tests for each snack on offer.
7. We could write tests for each food on offer.
8. We could write tests for each cocktail on offer.
9. We could write tests for each spirit and mixer on offer.
10. We could write tests for each hot drink on offer.
11. We could write tests for each pub machine/quiz on offer.
12. We could write tests for each toilet available.
13. We could write tests for each potential interaction on offer.
14. We could even go further and work out the typical person who drinks there and write tests for each
of them too.
Ok, so we‟ve got lots of scripted tests and they are pretty much spot on. They are the basics and I would be
surprised if any tester (who drinks) had not got that list. But the problem for me is that no matter how many
times we ran each of those scripts we have missed one absolutely crucial aspect. Context. We have still not
fully understood the pub. The only real way to fully understand the context is to observe the people who will
use the service. In this example – the pub goers.
3
So I asked the class to list a typical group of drinkers and I got these:
The locals/regulars
The binge drinkers at the weekend
The diners
The underage
Students
It‟s actually a pretty standard list and I know they had pre-conceived ideas based on *their* experience. But
here‟s what I actually observed in my local.
The locals/regulars
The binge drinkers
The diners
The underage
Students
The incredibly drunk and aggressive
The Hen and Stag Do
The birthday party (and other private party)
The social meeting (a local development group meet there)
The one off drinker – killing time waiting for a train etc.
The tourist
The business man
The emotional meeting (engagement, first date etc)
Business Meeting
We now have a list of end users which will no doubt help us test the pub. We could get blinding drunk and
see whether the beer still tastes good. But we are still missing some more elements of context. These are
distractions.
4
Pub staff
Partners and friends
Mobile Phones
Laptops
The TV
But that‟s not all context has to offer us. Context is also about the time at which something happens.
But hold on, there‟s some more contexts to consider in the form of the type of pub/pub.
And there‟s some more in terms of the social/economical make up of the customers:
Rich
Poor
Average
Celebrating
Stag or Hen Do
Business Meeting
And yet more when I looked at the actual people in the pub
Their mood
Their drink threshold or capacity
5
Mental state
Tiredness
Alcoholic state
Hungry?
Irritable?
Village?
City?
Busy street?
Quiet Street?
Big?
Small?
Fast Service?
Slow Service?
Modern?
Old?
Reputable and reliable suppliers?
So you get the picture. One pub. Thousands of contexts. The pub is a container with processes, services,
options and features. It‟s the people and the way they interact that truly makes a pub a pub. And this is of-
ten so overlooked by testers.
Sure, we shouldn‟t assume we are the end user but we certainly should be trying to understand them and
the context in which they use the software.
Most pubs probably don‟t cater for all circumstances and all people but even so, there are still literally thou-
sands of permutations. What happens when the stag party orders a drink made of beer, Tia Maria and lime
juice? Does the till recognize that combination? Do the pub staff know how to make it? Does it make the
Stag Party too rowdy and if so, what happens then? What if the drink the stag wants has run out? What if
the drunk passes out on the floor? What if someone orders food 1 minute past the deadline? What if the
pub is heaving?
Even looking at the drinks an average pub serves offers up a whole range of combinations.
6
And yet the testing community seem hung up on writing tests from specs and designs, which in turn are
written from the customer‟s ideas and requirements which may or may not have been written by observing
the real end users.
My guess is that they haven‟t been written from observations otherwise they‟d be too complicated to com-
municate. So when a tester asks me where to start when trying to test a mammoth system. I tell them to
observe the end user, chat to the end user, find out who they are, find out why they want the software and
find out under what context the software will be used.
There‟s a Purpose, an Audience and a Context to every single piece of software out there. And if these are
confused, unknown or not catered for the software will fail. If the team building and testing the software
know the Purpose, the Audience and the Context then the software stands a much better chance of being
fit for purpose.
To not understand the purpose, audience and context is to not understand the software under test. To write
test cases for the combinations identified and not spend time exploring under contexts is to miss the real
use of the system.
Pub. Computer System? It‟s all the same really. So when one of your team asks how they can test every-
thing or how every test should have a test case; take them down the pub for a pint.