Skip to content
/ MuRa Public

Ranks survived mutants according to their importance

License

Notifications You must be signed in to change notification settings

ZhongXiLu/MuRa

Repository files navigation

MuRa

Ranks survived mutants according to their importance.

An online example of the generated report can be found here based on feign.

How to Install

  • 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)

How to Use

Using PITest

  1. 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>
  1. Set up the config file for MuRa. Make sure everything is set properly.

  2. Now everything is ready to call MuRa (after mvn install the executable should be in pitest/target/pitest-1.0.jar):

java -jar pitest-1.1.jar -c config.xml
  1. Afterwards, the report should be generated in /index.html.

  2. If you want to find the optimal weights for your project, checkout this section.

Using another mutation testing tool

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.