Results 1 to 9 of 9

Thread: Mutation Testing

  1. #1
    Expert Member
    Join Date
    Oct 2006
    Answers
    209

    Mutation Testing

    What is mutation testing?

    Note : This is the question asked by a visitor aejaz ahmed. I am posting this in proper forum.


  2. #2
    Junior Member
    Join Date
    Nov 2006
    Answers
    16

    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.


  3. #3
    Expert Member
    Join Date
    Apr 2006
    Answers
    124

    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.


  4. #4
    Junior Member
    Join Date
    Nov 2006
    Answers
    16

    Re: Mutation Testing

    Hi bvani,

    I got a small doubt after reading your answer at the point "test if the output varies according to the changes" means here code changing means input values changing and testing that will effect the output or not?

    For Example: IF (a=b)
    0
    Else
    a-b
    }
    take this above program as an example.
    case1) values are a=1,b=1
    then the output will be " 0" this is in the program

    But If we change the values a=2, b=1
    then the output should be '1' not "0" .
    If the program returns '1' means the program is working fine other wise we should fix that error.

    Is my conversation is acceptable or anything wrong just reply to this post.


    Ramana.


  5. #5
    Contributing Member
    Join Date
    May 2006
    Answers
    78

    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.


  6. #6

    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.


  7. #7
    Moderator
    Join Date
    Sep 2006
    Answers
    920

    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.


  8. #8
    Expert Member
    Join Date
    Apr 2006
    Answers
    124

    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


  9. #9
    Junior Member
    Join Date
    Nov 2006
    Answers
    16

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact