C ++ Open Source Mutation Testing

I need an open source tool (even relatively primitive) that performs Mutation Testing in C ++ code. I require it to be open source, as I need to modify it to prove a conceptual experiment.

I tried Googling, but did not come up with open source tools, I came up with this question , but the suggested tools in the answers are either not open source or not mutate C ++.

+4
source share
2 answers

I assume that by β€œC ++ code” you mean something that mutates the source code, not the compiled version? Mutation of the source code is much more difficult to implement than an intermediate mutation of the code (for example, Java bytecode or .NET IL). Because of this, I strongly suspect that you will not find open source.

The challenge is to parse the source code as a syntax tree, a complex C ++ problem that will then allow you to identify mutation points and make the necessary changes to the source code. You can take a look at GCCXML as an open source starting point for parsing - adding a mutation is actually the simpler part of the problem.

The open source NinjaTurtles ( disclaimer: I'm the lead developer on this) will mutate assemblies compiled from .NET C ++ managed code, but I suspect it won't work for you?

+2
source

Have you looked into the Clan rewriting engine or their AST matches? Semantically, you can search for specific spots in the source code, then apply the transforms and recompile. It was designed to generate source tools and analysis.

It turns your own a bit, but I think it is definitely functional.

+2
source

All Articles