Mutation Testing - Software Testing - GeeksforGeeks
Mutation Testing - Software Testing - GeeksforGeeks
Mutation Testing - Software Testing - GeeksforGeeks
1. Value Mutations:
In this type of testing the values are changed to detect errors in the
program. Basically a small value is changed to a larger value or a
larger value is changed to a smaller value. In this testing basically
constants are changed.
Example:
Initial Code:
int mod = 1000000007;
int a = 12345678;
int b = 98765432;
int c = (a + b) % mod;
Changed Code:
2. Decision Mutations:
In decisions mutations are logical or arithmetic operators are changed
to detect errors in the program.
Example:
Initial Code:
if(a < b)
c = 10;
else
c = 20;
Changed Code:
if(a > b)
c = 10;
else
c = 20;
3. Statement Mutations:
In statement mutations a statement is deleted or it is replaces by some
other statement.
Example:
Initial Code:
if(a < b)
c = 10;
else
c = 20;
Changed Code:
if(a < b)
d = 10;
else
d = 20;
Judy
Jester
Jumble
PIT
MuClipse.
P pp_p… 9
Similar Reads
Difference between Error Seeding and Mutation Testing in Softwar…
1. Error Seeding :Error seeding can be defined as a process of adding
errors to the program code that can be used for evaluating the number …
3 min read
Company Languages
About Us Python
Legal Java
In Media C++
Contact Us PHP
Advertise with us GoLang
GFG Corporate Solution SQL
Placement Training Program R Language
GeeksforGeeks Community Android Tutorial
Tutorials Archive