10.12.2012 Views

Domain Testing: Divide and Conquer - Testing Education

Domain Testing: Divide and Conquer - Testing Education

Domain Testing: Divide and Conquer - Testing Education

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.

For instance, in the above example, there are two possible paths. One path is that<br />

event A occurs <strong>and</strong> the other path corresponds to the possibility that event B occurs.<br />

Of course, there is another possible path for all the cases when the value of<br />

x is non-numeric. In the above example it is difficult to tell, but normally if there<br />

were an error-h<strong>and</strong>ling capability incorporated in the program, the path taken in the<br />

event of such an error would be whatever is mentioned in the corresponding error-<br />

h<strong>and</strong>ling construct of the program.<br />

In domain testing, the first main task is to partition the input domain into<br />

partitions or equivalence classes based on some criterion. As mentioned before, the<br />

criterion in the path analysis approach is the path. All members of one partition or<br />

subset of the input domain are expected to result in the execution of the same path<br />

of the program (Howden, 1976; Weyuker & Jeng, 1991; White & Cohen, 1980). In<br />

the example above, the set of all values of variable x less than 10 forms one<br />

partition <strong>and</strong> the set of all values of x greater than or equal to 10 forms another.<br />

2.01.01.01.02 Mutation <strong>Testing</strong> Approach<br />

If a program passed all the tests from a subdomain, then can one really be sure that<br />

the program is actually correct? Either the program really is correct over that<br />

subdomain or the tester is using a set of ineffective test cases to test the program<br />

(DeMillo et al., 1978). This is where mutation testing comes into play.<br />

Mutation testing involves creating a set of wrong versions of a program,<br />

called mutants, for every subdomain over whose members the original program<br />

seems to operate correctly. That is, it is known to have passed all the tests in that<br />

subdomain (DeMillo et al., 1978). A mutant of a program is usually formed by<br />

modifying a single statement of the original program (Weyuker & Jeng, 1991). The<br />

statement that is modified will depend on which portion of the program the<br />

associated subdomain corresponds to.<br />

Adrion, Branstad <strong>and</strong> Cherniavsky (1982), DeMillo et al. (1978), Howden<br />

(1981), Jeng <strong>and</strong> Weyuker (1989), Podgurski <strong>and</strong> Yang (1993), <strong>and</strong> Weyuker <strong>and</strong><br />

15

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

Saved successfully!

Ooh no, something went wrong!