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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

show that homogeneity is an important factor which impact partition based<br />

test<strong>in</strong>g effectiveness.<br />

Besides conventional failure rate model used by Duran and Ntafos [DN84],<br />

Hamlet and Taylor also <strong>in</strong>vestigate a comparison between partition based and<br />

random based test<strong>in</strong>g by the so-called Valiant’s Model [Val84]. The motivation<br />

of this study is that faults are uniformly distributed over the state space of the<br />

program code, not over its <strong>in</strong>put space. Valid partitions are therefore those that<br />

result from reflect<strong>in</strong>g uniform coverage of program states <strong>in</strong>to the <strong>in</strong>put doma<strong>in</strong><br />

where test<strong>in</strong>g is done. Valiant’s Model does not allow to calculate such partition<br />

but it allows to relate the number of test data to the probability of miss<strong>in</strong>g a<br />

failure. Thus, for a given probability of miss<strong>in</strong>g a failure, it is possible to compare<br />

the number of test test data for both random based and partition based test<strong>in</strong>g.<br />

Experimental results <strong>in</strong>dicate that random based test<strong>in</strong>g outperforms partition<br />

based test<strong>in</strong>g many times.<br />

Experiments performed <strong>in</strong> the contribution of Hamlet and Taylor confirm<br />

conclusion of Duran and Ntafos: partition based and random based test<strong>in</strong>g are<br />

of almost equal value with respect to their ability to detect faults. Hamlet and<br />

Taylor explore the impact of homogeneity of subdoma<strong>in</strong>s on the ability to detect<br />

faults of partition based test<strong>in</strong>g. They are not able to show that homogeneity is<br />

an important factor.<br />

Ntafos [Nta98] presents further comparisons between random based and partition<br />

based test<strong>in</strong>g. Additionally, the expected cost of failures is taken <strong>in</strong>to account<br />

as a way to evaluate the effectiveness of test<strong>in</strong>g strategies. A comparison<br />

is made between random based test<strong>in</strong>g and proportional partition based test<strong>in</strong>g.<br />

The latter is a partition based test<strong>in</strong>g method where the number of allocated<br />

test data for each subdoma<strong>in</strong> depends on the probability that a chosen test data<br />

falls <strong>in</strong>to this subdoma<strong>in</strong>. Shortly, the ratio between the number of selected test<br />

data for two arbitrary subdoma<strong>in</strong>s is equal to the ratio between probabilities<br />

that a test data falls <strong>in</strong>to these subdoma<strong>in</strong>s.<br />

First of all the power of proportional partition based test<strong>in</strong>g is <strong>in</strong>vestigated. A<br />

problem here is that occurrences of rare special conditions (subdoma<strong>in</strong>s with low<br />

probability that randomly chosen test data fall <strong>in</strong>to them) require a large number<br />

of test data. Suppose that an <strong>in</strong>put doma<strong>in</strong> is divided <strong>in</strong>to two subdoma<strong>in</strong>s and<br />

one of them corresponds to a rare special condition which occurs once <strong>in</strong> a<br />

million runs. Then proportional partition based test<strong>in</strong>g would require a total of<br />

1, 000, 001 test data to test a program that consist of a s<strong>in</strong>gle IF statement. It is<br />

also argued that if the number of required test data grows, proportional partition<br />

based test<strong>in</strong>g allocates test data which are the same as randomly selected test<br />

data. Thus, even though some experiments show that proportional partition<br />

based test<strong>in</strong>g performs at least as well as random based test<strong>in</strong>g, the difference<br />

between the respective performances tends to zero while the number of test data<br />

grows. Simulation experiments <strong>in</strong> which Pr and Pp are compared are presented.<br />

The allocation of test data <strong>in</strong> each subdoma<strong>in</strong> is parameterized by the probability

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

Saved successfully!

Ooh no, something went wrong!