QA Tutorials

MUTATION TESTING 1

SYSTEM TESTING

Mutation testing is a type of testing technique where a certain change in the source code statements is made to check whether the test cases are able to find the error. It is a type of white box testing which is used for unit testing. The goal or purpose of this testing is to check the quality of test cases which is robust enough to fail the mutant code. It is also called as fault based testing.

Types of mutation testing:

  1. Statement mutation: Some part of source code is cut and pasted by the developer, that is changes are done by deleting or duplicating the line, which may be to find fault.
  1. Value mutation: Primary parameter values are modified. We usually change one value to much larger value or one value to much smaller value.
  1. Decision mutation: Control statements which are used for decision making are to be changed. The conditions are checked for design errors. For example: one change in arithmetic operators to locate the defects and also consider mutating the relational operators and logical operators.

How mutant program is created

A mutation is nothing but a small change in syntactic code of original program statement.

Original program

If(x>y)

Print “Hello”;

Else

Print “Hi”;

Mutant program

If(x<y)

Print “Hello”;

Else

Print “How are you”;

Mutation testing benefits:

  1. It is used to find a special new kind of errors and drags developer’s attention
  2. It is most effective way to find the hidden defects in a program which is difficult to identify, by the developer.
  3. Increased customer satisfaction index as product would cause less bugs
  4. Debugging and maintaining is easy.

How to do mutation testing

 

MUTATION TESTING
MUTATION TESTING

 

CLICK HERE TO CONTINUE READING…

Facebook Comments
Tags

Related Articles

2 thoughts on “MUTATION TESTING 1”

Leave a Reply

Your email address will not be published. Required fields are marked *

Close