Is it harder (or impossible) to implement mutation testing in some languages than others? For example, is it possible to implement mutation testing in functional programming languages?
Mutpy is a Mutation testing tool in Python that generated mutants and computes a mutation score. It supports standard unittest module, generates YAML/HTML reports and has colorful output. It applies mutation on AST level.
Mutation testing is a testing technique used to improve the adequacy of tests and identify defects in code. The idea is to change the production code dynamically and cause the tests to fail.
Mutation testing, also known as code mutation testing, is a form of white box testing in which testers change specific components of an application's source code to ensure a software test suite will be able to detect the changes. Changes introduced to the software are intended to cause errors in the program.
Mutation testing is done by selecting a set of mutation operators and then applying them to the source program one at a time for each applicable piece of the source code. The result of applying one mutation operator to the program is called a mutant.
There seems to be some recent research from Oregon State on a mutation testing framework for Haskell called MuCheck: http://web.engr.oregonstate.edu/~alipour/pub/mucheck.pdf http://web.engr.oregonstate.edu/~alipour/pub/fp_mutation.pdf
The code is available at https://bitbucket.org/osu-testing/mucheck.git
I don't see any reason why it would be impossible in any language.
I'm certainly no expert, but I would think that mutation testing would be easier in functional languages. Mutations can be done by redefining operators in functional languages as easily as functions are defined in other languages.
There is no specific language support in .NET. However there are frameworks that use features of .NET to acheive mutation testing. One such framework, its early days of development is
NinjaTurtles
I know the guys working on this, so consider this a shameless plug, but the team includes some very active and accomplished stack overflow contributors. They are all unashamed geeks and c#/.net experts, so you should have confidence in the quality of the project.
As I mentioned, it is in the very first few weeks of development, and it is well worth watching. If you have a feature request, now is the time to mention it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With