======================================================================== What are the two necessary and sufficient conditions for fault-based testing to ensure program correctness with respect to its specification? Explain each of them briefly. ============ ======================================================================== 1)the fault-based arena must be alternate-sufficient. Fault-based testing can only produce conclusions about programs associated with the fault-based arena. If a program is to be declared correct via fault-based testing it must be either the original program or one of its alternates. Hence, one of these programs associated with the arena must be correct for fault-based testing to make such a conclusion. A fault-based arena which contains a correct program is called alternate-sufficient. 2) coupling should not occur for the test set. Fault-based testing frequently proceeds on the assumption that alternates can be precluded one at a time without side effects. Alternatives are coupled if each is individually precluded by a test, but the combination is not precluded by the same test. If no set of alternatives are coupled, then distinguishing all single alternate programs distinguishes all multiple alternate programs. ============ ======================================================================== In symbolic testing we replace constants with symbols to model infinitely many executions. Explain domain dependent and domain independent transformations by giving one example for each. Which one is harder to test afterwards and why? ============ ======================================================================== Let's say the original program is, If x=0 then y:=1 else y:=x*x The two are examples: Domain Independent If x= 1 then y:=1 else y:=x*x Domain Dependent If x= F then y:=1 else y:=x*x (where F is a symbol) Domain dependent transformations are generally more difficult to test, because the program may differ for each input. ============ ======================================================================== What is the difference between the fault-based and traditional approaches? What is each approach trying to do? ============ ======================================================================== Traditional testing approaches tried to find, and eliminate, as many faults as possible. Fault-based testing approaches, on the other hand are not based on the number of faults eliminated. The goal is to determine the absence of pre-specified faults. It uses the fact that every correct program execution contains information that proves the program could not have contained particular faults.