测试用例生成 之 All-Pairs Testing
上一篇 /
下一篇 2016-08-05 17:11:16
/ 个人分类:SoftTest
Refer to: https://en.wikipedia.org/wiki/All-pairs_testing
51Testing软件测试网Pf`
puQ
All-pairs testing or pairwise testing is a combinatorial software testing method that, for each pair of input parameters to a system (typically, asoftware algorithm), tests all possible discrete combinations of those parameters. Using carefully chosen test vectors, this can be done much faster than an exhaustive search of all combinations of all parameters, by "parallelizing" the tests of parameter pairs. The number of tests is typically O(nm), where n and m are the number of possibilities for each of the two parameters with the most choices. The reasoning behind all-pairs testing is this: the simplest bugs in a program are generally triggered by a single input parameter. The next simplest category of bugs consists of those dependent on interactions between pairs of parameters, which can be caught with all-pairs testing.[1]Bugs involving interactions between three or more parameters are progressively less common,[2] while at the same time being progressively more expensive to find by exhaustive testing, which has as its limit the exhaustive testing of all possible inputs.[3]51Testing软件测试网W%`7gzfz
fIl
Many testing methods regard all-pairs testing of a system or subsystem as a reasonable cost-benefit compromise between often computationally infeasible higher-order combinatorial testing methods, and less exhaustive methods which fail to exercise all possible pairs of parameters. Because no testing technique can find all bugs, all-pairs testing is typically used together with other quality assurance techniques such as unit testing,symbolic execution, fuzz testing, and code review.51Testing软件测试网
gYy&j,K2Te
-x\2EX_e:Y&e2O3J0
bu:[#nQ0 Download the tool: http://www.satisfice.com/tools.shtml51Testing软件测试网 S4EM"V/~Wo
http://www.satisfice.com/tools/pairs.zip51Testing软件测试网S1R5[O-P(s9{
0l'i)@Q%F x9q8BVACs0
/p"G,?E0?_0 Usage:
Gm'^/@l0To use Allpairs, prepare a tab-delimited
table of parameters that you'd like to permute. The easiest way to do this is
with Excel:
}F3E
wTC1a1\0 51Testing软件测试网v
X"c8e;Oz
Operating System51Testing软件测试网WA6a7G"x
uE | Printer 6g7h;m]F3]0 | Duplex51Testing软件测试网0fjiZ1t:e9U+Z |
Win98 ;T$tgb3r9b0 | HP 405051Testing软件测试网
Im.D1]in9ET#ec | Y51Testing软件测试网(v^J cNT6uC/t/yC |
Win2K *p'X#hd5~3p0 | HP 4100 nPwK
p0 | N rJ$on2A:NJ0 |
WinXP51Testing软件测试网r4f-h2lP | 51Testing软件测试网:O(FX#yD_+X Kyb/B | 51Testing软件测试网'j^ jy+w5I;n.sT4LN |
8Rzy.l{hg$i0Then copy the excel table and paste into
a text file (let’s say you name itvars.txt). Run the Allpairs program from
a DOS command-line like this:
`lA&STM*C'S0ALLPAIRS
VARS.TXT > TESTCASES.TXT51Testing软件测试网8c{(^.vh!e0E
If you have Perl installed, you can run
the script. instead like so:51Testing软件测试网qd-[4Ivq)W;@,jO8m2qR
PERL
ALLPAIRS.PL VARS.TXT > TESTCASES.TXT
Ac&ZC&sM0bzQr)l.t0
收藏
举报
TAG: