Mutation Testing

▪︎Mutation testing is a structural testing technique, which uses the structure of the code to guide the testing process. 

▪︎On a very high level, it is the process of rewriting the source code in small ways in order to remove the redundancies in the source code.

▪︎Mutation Testing is a type of Software Testing that is performed to design new software tests and also evaluate the quality of already existing software tests.

▪︎Mutation Testing is a White Box Testing.

▪︎Mutation testing can be applied to design models, specifications, databases, tests, and XML.

▪︎It can be described as the process of rewriting the source code in small ways in order to remove the redundancies in the source code.

Objective:

▪︎To identify pieces of code that are not tested properly.

▪︎To identify hidden defects that can’t be detected using other testing methods.

▪︎To discover new kinds of errors or bugs.

Types of Mutual Testing:

1)Value Mutations

▪︎An attempt to change the values to detect errors in the programs.

▪︎We usually change one value to a much larger value or one value to a much smaller value. The most common strategy is to change the constants.

2)Decision Mutations:

▪︎ The decisions are changed to check for the design errors. Typically, one changes the arithmetic operators to locate the defects

▪︎ we can consider mutating all relational operators and logical operators (AND, OR , NOT)

3)Statement Mutations:

 Changes done to the statements by deleting or duplicating the line which might arise when a developer is copy pasting the code from somewhere else.

Advantages :

▪︎It brings a good level of error detection in the program.

▪︎It discovers ambiguities in the source code.

Disadvantages:

▪︎It is highly costly and time-consuming.

▪︎It is not able for Black Box Testing.

Posted on by