Ranks survived mutants according to their importance.
An online example of the generated report can be found here based on feign.
-
The project is built using Maven, so the regular Maven commands apply:
mvn install
to install the modules. -
Alternatively, you can download the executable jar on the package page.
-
Finally, you can also use the web interface so you don't have to worry about setting the right values for the configuration and such: MuRa-Web. Skip the steps below if you do so. (recommended)
Using PITest
- First let PITest run the mutation analysis and generate the reports,
make sure there's a directory
/target/pit-reports
present afterwards.
mvn test -Dfeatures=+EXPORT org.pitest:pitest-maven:mutationCoverage
To include PITest into your project, add the following plugin in your pom.xml
:
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.4.7</version>
<configuration>
<outputFormats>XML</outputFormats>
</configuration>
<executions>
<execution>
<id>pitest</id>
<goals>
<goal>mutationCoverage</goal>
</goals>
</execution>
</executions>
</plugin>
-
Set up the config file for MuRa. Make sure everything is set properly.
-
Now everything is ready to call MuRa (after
mvn install
the executable should be inpitest/target/pitest-1.0.jar
):
java -jar pitest-1.1.jar -c config.xml
-
Afterwards, the report should be generated in
/index.html
. -
If you want to find the optimal weights for your project, checkout this section.
Use the com.github.mura.core
library to call MuRa and pass the survived mutants of your mutation testing tool. An example of how this is done can be found in the pitest
module.