Software Testing - Mutation Testing
What is 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
These ambiguities might cause failures in the software if not fixed and can easily pass through testing phase undetected.
Mutation Testing Benefits:
Following benefits are experienced, if mutation testing is adopted:
It brings a whole new kind of errors to the developer's attention.
It is the most powerful method to detect hidden defects, which might be impossible to identify using the conventional testing techniques.
Tools such as Insure++ help us to find defects in the code using the state-of-the-art.
Increased customer satisfaction index as the product would be less buggy.
Debugging and Maintaining the product would be more easier than ever.
Mutation Testing Types:
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.
Decision Mutations: The decisions/conditions are changed to check for the design errors. Typically, one changes the arithmetic operators to locate the defects and also we can consider mutating all relational operators and logical operators (AND, OR , NOT)
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.