Manual allpairs

Solo disponible en BuenasTareas
  • Páginas : 4 (953 palabras )
  • Descarga(s) : 4
  • Publicado : 19 de mayo de 2010
Leer documento completo
Vista previa del texto
ALLPAIRS

By James Bach, james@satisfice.com , www.satisfice.com

Installation Instructions
Unzip everything into a directory. That’s all.

How to Use
Allpairs.pl is a Perl script thatconstructs a reasonably small set of test cases that include all pairings of each value of each of a set of parameters. Actually, I don’t know if I’m saying that right. Let me show you. If you have twoparameters you want to cover in a set of tests, say, printer and operating system, they might look something like this:

Operating System
Win98
Win2K
WinXP

Printer
HP 4050
HP 4100

To testall the pairings, the test cases would look like this:

CASE
OS
Printer
1
Win98
HP 4050
2
Win98
HP 4100
3
Win2K
HP 4050
4
Win2K
HP 4100
5
WinXP
HP 4050
6
WinXP
HP 4100

In thecase of two parameters, all pairs is also all combinations. But look what happens when we add a third parameter:

Duplex Print
Y
N

CASE
OS
Printer
Duplex
1
Win98
HP 4050
Y
2
Win98
HP4100
Y
3
Win2K
HP 4050
Y
4
Win2K
HP 4100
Y
5
WinXP
HP 4050
Y
6
WinXP
HP 4100
Y
7
Win98
HP 4050
N
8
Win98
HP 4100
N
9
Win2K
HP 4050
N
10
Win2K
HP 4100
N
11
WinXP
HP4050
N
12
WinXP
HP 4100
N

All combinations of each of these parameters creates twelve test cases. But what if all we really need is a set of test cases that guarantee that each value of eachparameter is paired in at least one case? Then we can get away with fewer cases. We’re back down to six, in fact:

CASE
OS
Printer
Duplex
1
Win98
HP 4050
Y
2
Win98
HP 4100
N
3
Win2K
HP4050
N
4
Win2K
HP 4100
Y
5
WinXP
HP 4050
Y
6
WinXP
HP 4100
N

If a bug will be triggered when the value of any one of the three parameters is paired with a value of either of the othertwo, then we’ll catch it with this set of test cases. If a bug occurs only when three specific values are tried together, this set of cases will not necessarily catch it, but at least we’ve achieved...
tracking img