Hello and welcome back to my final blog post of the semester. As we have come to the end now, the last topic discussed in class was one of the most interesting in fact. The name alone, really sticks with you and catches your eye. But what does “Mutation Testing” mean exactly?
Mutation Testing is a type of software test in which you would change or “mutate” certain parts of the source code to see if your test code is adequate and is able to detect the proper errors in the code. Interesting concept here but how would this be done?
After coding the program and creating test code, we still need to figure out if the test code is adequate here. Therefore with this method, we would create alternate versions of the source code which is called a mutant with a single fault in each one to test how efective our test cases are. The test cases are then applied to these mutant programs and you must compare the result. The goal of Mutant testing is for the mutant to generate different outputs with the test cases and if it does not, then you keep the Mutant code alive and need to create better test cases until different outputs from the original are generated.
Now, the first thing that really came to mind when going through this idea was, “Wow, thats pretty interesting and it does make a lot of sense, ill start to try that from now on. But wait, this sounds like it could add hours to my programming, which seems pretty inconvenient so maybe not.” Inconvenient indeed, which is why Mutation testing more or less died after its developement in 1971 but with Automation tools like Stryker and PIT, mutation testing has once again picked up steam in the software testing world.
From the blog CS@Worcester – The ways of the Computer: A Blog by JTekelis by jtekelis and used with permission of the author. All other rights reserved by the author.