Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What programming languages can support mutation testing?

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?

like image 815
Andrew Grimm Avatar asked Jun 07 '10 14:06

Andrew Grimm


People also ask

What is mutation testing Python?

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.

What is mutation testing Java?

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.

What is mutant in programming?

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.

How we can conduct mutation testing?

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.


Video Answer


3 Answers

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

like image 200
Catalin Hritcu Avatar answered Sep 29 '22 13:09

Catalin Hritcu


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.

like image 30
Bill the Lizard Avatar answered Sep 27 '22 13:09

Bill the Lizard


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.

like image 32
Daniel Dyson Avatar answered Sep 28 '22 13:09

Daniel Dyson