Software testing is very important phase in software development life cycle. The process of executing a software with intention of finding bugs or defects is called software testing. In most of the organizations generally testing process is carried out on software or an application.
Mutation Testing
One of the types of testing is Mutation testing which is carried out to find out efficiency of test cases or test suit.
Mutation testing is fault-based testing technique. In mutation testing we change some syntax in source code and check if test cases are able to find bugs. This type of testing is used in unit testing.
The purpose of mutation testing is to find out efficiency and effectiveness of test cases.Mutation testing is introduced by Lipton in 1971.
Process of mutation testing is :
- Introduce faults into source code
- Execute original program and mutant program
- Compare results
- IF result of original program and mutant program is same then mutant is killed.
- If result of original and mutant program is different then mutant is alive
Below is an example of mutation testing
Original Program | Mutant Program |
if(x>y)
print “x greater than y” else print “y greater than x” |
if(x<y)
print “x greater than y” else print “y greater than x” |
Mutation testing is very complicated task to do manually. Various tools available for automation of mutation testing. Tools developed for java programs are Judy,jester,mujav etc.
Mutation score :
Mutation score is percentage of killed mutants with total added mutants.
Mutation score=(Killed mutants/Total mutants)*100
Advantages:
- Mutation testing is used to attain high coverage of source program
- Used to find effectiveness of test cases
- Helps in finding defects at unit level
Disadvantages:
- Mutation testing is very costly and time consuming task
- Mutation testing is very complex task
Author : Snehal Takawale
I am having almost 4 years of experience in various software testing technologies. Involved in various domain like banking, insurance, healthcare, e commerce. I love to explore new things.