0% found this document useful (0 votes)
4 views4 pages

Mutation Testing: Mutants Killed Dead

Mutation testing involves introducing faults into a program by creating multiple versions, known as mutants, to assess the effectiveness of test data in detecting errors. The process includes executing the program, constructing a mutant set, and testing each mutant with the goal of causing failures. If any mutants remain undetected, it may indicate either the mutation is equivalent to the original code or the test data lacks sensitivity.

Uploaded by

harishs24082003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views4 pages

Mutation Testing: Mutants Killed Dead

Mutation testing involves introducing faults into a program by creating multiple versions, known as mutants, to assess the effectiveness of test data in detecting errors. The process includes executing the program, constructing a mutant set, and testing each mutant with the goal of causing failures. If any mutants remain undetected, it may indicate either the mutation is equivalent to the original code or the test data lacks sensitivity.

Uploaded by

harishs24082003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 4

Mutation Testing

• Mutation testing is the process of mutating some segment of


code(putting some error in the code) and then testing this mutated
code with some test data. If the test data is able to detect the
mutations in the code,

• Mutation testing helps a user create test data by interacting with the
user to iteratively strengthen the quality of test data. During mutation
testing, faults are introduced into a program by creating many
versions of the program, each of which contains one fault. Test data
are used to execute these faulty programs with the goal of causing
each faulty program to fail.

• Faulty programs are called mutants of the original program and a


mutant is said to be killed when a test case causes it to fail. When
this happens, the mutant is considered dead

1
Basic Steps of Mutation Testing

Executing the Program


Mutation Testing
On the Test Data 1

Add More
Constructing the
Test Cases 5 Mutant Set 2

Terminating Mutation Executing Each


Testing 4 Mutant 3

If some live imitations remain, there are 2 possible reasons:

1. The Mutation is equivalent to the original code


(not very likely)
2. The Test Data is not adequately sensitive.

Mutation Testing starts with test data designed by other methods,


and is the only defect-directed technique for testing the completeness of test suites.
Mutation Testing

• Let us take one example of C program shown below



If (a>b)
x = x + y;
else
x = y;
printf(“%d”,x);
….
We can consider the following mutants for above example:
• M1: x = x – y;
• M2: x = x / y;
• M3: x = x+1;
• M4: printf(“%d”,y);

3
Mutation Testing

You might also like