07.01.2013 Views

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

11 Evaluat<strong>in</strong>g Coverage Based Test<strong>in</strong>g 305<br />

error is detected 11 out of 50 times, the second error 24 times and the third error<br />

45 out of 50 times. The simple error <strong>in</strong> the second program is detected by 21 out<br />

of 24 times. For the third program 50 test cases were generated. The simple error<br />

was detected 18 of 50 times. More programs were tested with similar results.<br />

One of the features of coverage criteria is that they can be used to measure<br />

coverage of test suites generated by other methods. The authors evaluate some<br />

test suites generated by random based test<strong>in</strong>g, with program based coverage<br />

criteria. Test suites are generated for the programs previously used to evaluate<br />

random based test<strong>in</strong>g. The idea is to simply generate a test suite and then to use<br />

a given criterion to see if the test suite satisfies the requirements stated by the<br />

criterion. Several criteria are then considered to measure random based test<strong>in</strong>g<br />

adequacy. The number of test data generated ranges between 20 and 120 and<br />

five programs from the previous experiments were used. The over-all result is,<br />

that for a moderate number of random test data random based test<strong>in</strong>g allows to<br />

cover these criteria for coverage percentages rang<strong>in</strong>g from 57 percent up to 94<br />

percent depend<strong>in</strong>g on the criterion.<br />

The experiments presented <strong>in</strong> the paper <strong>in</strong>dicates that it is reasonable to assume<br />

that random based test<strong>in</strong>g can f<strong>in</strong>d more errors per unit cost than partition<br />

based test<strong>in</strong>g, s<strong>in</strong>ce carry<strong>in</strong>g out some partition based test<strong>in</strong>g scheme is much<br />

more expensive than perform<strong>in</strong>g an equivalent number of random test data. This<br />

holds for homogeneous subdoma<strong>in</strong>s and for values of θi uniformly distributed.<br />

Assumptions on failure rates may be unrealistic but actual evaluations show<br />

that random based test<strong>in</strong>g seems to discover some relatively subtle errors without<br />

great efforts. Moreover, random based test<strong>in</strong>g seems to ensure a high level<br />

of coverage for some usual coverage criteria.<br />

Hamlet and Taylor [HT90] explore the results of Duran and Ntafos more deeply.<br />

They perform experiments based on statistical assumptions very similar to those<br />

made by Duran and Ntafos.<br />

They compare partition based test<strong>in</strong>g and random based test<strong>in</strong>g with respect<br />

to the conventional failure rate model used by Duran and Ntafos. They are<br />

compared by different numerical valuations of their respective probabilities to<br />

detect faults for the same number of selected test data (Σ k<br />

i=1 ni = n). Different<br />

relationships between θ and θi are proposed:<br />

• The first relationship is based on the assumption that if a test data is randomly<br />

selected, the probability that this test data is an element of any subdoma<strong>in</strong><br />

is 1/k. Thusθisthe average of the sum of all θi: θ = 1<br />

k Σk θi. The<br />

i=1<br />

difference between random based and partition based test<strong>in</strong>g <strong>in</strong> terms of the<br />

probability of f<strong>in</strong>d<strong>in</strong>g at least one failure will be maximal when the variance<br />

of the θi has a maximum. If only one test data per subdoma<strong>in</strong> is selected,<br />

this occurs if only one subdoma<strong>in</strong>, the j th one, is failure caus<strong>in</strong>g (θj = kθ<br />

and θi =0fori�= j ). This situation is studied for different failure rates<br />

and different sizes of partitions. To give a significant advantage to partition<br />

based test<strong>in</strong>g, the number k of subdoma<strong>in</strong>s has to be of the same order of

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!