-
Expert Member
Mutation Testing
What is mutation testing?
Note : This is the question asked by a visitor aejaz ahmed. I am posting this in proper forum.
-
Junior Member
Re: Mutation Testing
Mutation testing- :
A method for determining if a set of test data or test cases is useful or not by intentionally inserting various code changes ('bugs') and retesting with the original test data/cases to determine if the 'bugs' are detected or not.If the bugs are detected means our test cases are usefull or perfect.If the bugs are not detected means we need to modify our test cases.
Note: we are making changes to the code only not to our previous test cases.
Ramana.
-
Expert Member
Re: Mutation Testing
This is a part of Unit Testing.
In mutation testing we change the code intentionally and test if the output varies according to the changes. if the output varies according to the changes we continue next program testing.
If the output does not vary according to the changes in the program code we continue the program testing till the error is fixed.
-
-
Contributing Member
Re: Mutation Testing
I think bvani was mentioning regarding the changes in program code and not changes in input test values. However i find both of u are right from your own perspectives.
-
Junior Member
Re: Mutation Testing
A method to determine test suite thorougheness by measuring the extent to which a test suite can discriminate the program from slight varient (mutants) of the program.
It is back -to -back testing.
-
Moderator
Re: Mutation Testing
Mutation testing tells us about effectiveness of testcases.It comes under whitebox testing.We intentially add some mutants(errors) in the coding, and then see whether we catch them at the time of testing/ test case executation.
With regards,
Brijesh Jain.
-
Expert Member
Re: Mutation Testing
Thanks Bharathi, Susheel & Brijesh that was timely.
Ramana I mentioned mutation testing is a part of unit testing
which comes under white box testing. Here we are concentrating
on the code and not the test cases. We check how efficient is the code ?
How is the code handling the various inputs given to it ?
check with this example :
if(a==b)
print "they are equal";
else
print "they are unequal";
the o/p of the program for i/p like
a=5,b=5
a=5,b=7
would be :
"They are equal"
"They are unequal"
As this is a build / modular level testing the programmer does the
mutation testing for his module.
--------------------------------------------------
Now the programmer checks for the efficiency of
the program by inserting an error in his code
if(a!=b)
print "they are equal";
else
print "they are unequal";
for inputs
a=5,b=5
a=5,b=7
the o/p of the program should be
"They are unequal"
"They are equal"
--------- developer knows there is a bug in the program and checks
if the output is according to the changes in program
so here he finds his code is working and goes ahead in testing the next module.
But instead if the changed program still returns
"They are equal"
"They are unequal"
for inputs
a=5,b=5
a=5,b=7
Its clear to the developer that his program not correct.
And goes to correcting the program and does the testing once again.
This testing is done by the developer as he know he has changed the code.
let me know if thats clear... :-) Bhavani
-
Junior Member
Re: Mutation Testing
Hi Bhavani,
Yes, my doubt is now clear. Iam really satisfied with your explanation.
Thanks a lot
Ramana.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules