Automatically recognize which mutants killed by which test cases in Pitest

I am using Pitest for mutation testing and I need lots of mutants for a project (for example 500 mutants). I need a matrix which shows which mutants that the Pitest has created, killed by which test cases. I can do it manually, but it takes a long time.

Is it possible to do it automatically? if Yes how, if no what is my choices for a solution?

Upvotes: 2

Views: 464

Answers (2)

nrainer
nrainer

Reputation: 2623

Pitest supports the computation of a full mutation matrix since version 1.4.3. The feature has not been documented yet, but a brief description can be found here: https://github.com/hcoles/pitest/issues/510#issuecomment-465899299

Upvotes: 0

henry
henry

Reputation: 6096

Pitest does not generate a mutant test matrix out of the box, it stops analysing each mutant as soon as a killing test is found.

Your options are to either write a script that execute it multiple times limiting it to considering a single test on each run, or to modify the code so that it no longer stops when each mutant is killed and somehow outputs the mutants killed by each test.

Upvotes: 4

Related Questions