Fork me on GitHub

Descartes: An Extreme Mutation Engine for PIT

build-on-push Maven Central

I mutate therefore I am

What is Descartes?

Descartes evaluates the capability of your test suite to detect bugs using extreme mutation testing. It is able to find poorly tested methods in a project.

Descartes is developed as a mutation engine plugin for PIT which implements extreme mutation operators as proposed in the paper Will my tests tell me if I break this code?. It also works alongside other PIT extensions to provide descriptive and actionable reports.

Quick start with Maven

To use Descartes in a Maven project, add the following plugin configuration to your pom.xml:

<plugin>
  <groupId>org.pitest</groupId>
  <artifactId>pitest-maven</artifactId>
  <version>1.20.2</version>
  <configuration>
    <mutationEngine>descartes</mutationEngine>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>eu.stamp-project</groupId>
      <artifactId>descartes</artifactId>
      <version>1.3.4</version>
    </dependency>
  </dependencies>
</plugin>

Then, execute the regular mutation coverage goal in the root folder of the project under test:

cd my-project-under-test
mvn clean package org.pitest:pitest-maven:mutationCoverage

All options from PIT can be used. For more details check the PIT documentation.

Check Running Descartes on you project for additional Descartes configuration options and how to use it with other build systems such as Gradle or even directly from the command line.

Check the frequently used configurations to find quick configuration snippets showing how to use other testing frameworks such as JUnit 5 or TestNG and how to change Descartes' default behavior.

If you use a multi-module project take a look at PitMP.

You can check here a comparison between Descartes and Gregor, the default mutation engine for PITest, considering the number of mutants both engines created for the same projects, and the total execution time.

Quick start with the repository

Clone the repository:

git clone https://github.com/STAMP-project/pitest-descartes.git

switch to the cloned folder:

cd  pitest-descartes

install Descartes using the regular Apache Maven commands:

mvn install

Project

Referencing Descartes

If you use Descartes on your research projects you may cite is as:

@inproceedings{vera_descartes_2018,
  author    = {Vera-Pérez, Oscar L. and Monperrus, Martin and Baudry, Benoit},
  url       = {https://dl.acm.org/citation.cfm?doid=3238147.3240474},
  booktitle = {Proceedings of the 2018 33rd ACM/IEEE International Conference on Automated Software Engineering (ASE ’18)},
  date      = {2018},
  month     = {09},
  doi       = {10.1145/3238147.3240474},
  pages     = {908--911},
  title     = {Descartes: A {PITest} Engine to Detect Pseudo-Tested Methods},
  urldate   = {2019-08-06},
  doi       = {10.1145/3238147.3240474},
  arxiv     = {https://arxiv.org/abs/1811.03045},
  hal       = {https://hal.inria.fr/hal-01870976v1}
}

License

Descartes is published under LGPL-3.0.

Contributing

Issues, pull requests and other contributions are welcome. Check our Github repository

Funding

Until December 2019 Descartes was partially funded by the STAMP research project (European Commission - H2020).

STAMP - European Commission - H2020