Giter Site home page Giter Site logo

stamp-project / pitest-descartes Goto Github PK

View Code? Open in Web Editor NEW
124.0 14.0 20.0 2.69 MB

Descartes supports developers to improve their test suites by reporting weak spots in covered code

Home Page: https://hal.archives-ouvertes.fr/hal-01870976/document

License: GNU Lesser General Public License v3.0

Java 97.90% Lex 2.10%
mutation-testing pitest mutation-analysis java inria h2020

pitest-descartes's Introduction

Descartes: A Mutation Engine for PIT

build-on-push Maven Central

What is Descartes?

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

Descartes is 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?.

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.7.0</version>
  <configuration>
    <mutationEngine>descartes</mutationEngine>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>eu.stamp-project</groupId>
      <artifactId>descartes</artifactId>
      <version>1.3.2</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 your project" for additional Descartes configuration options.

For Gradle support check Using Gradle.

For quick configuration snippets showing how to use other testing frameworks such as JUnit 5 or TestNG and how to change Descartes' behavior check How to....

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

Table of contents

How does Descartes work?

Mutation testing

Mutation testing allows you to verify if your test suite can detect possible bugs. The technique works by introducing small changes or faults into the original program. These modified versions are called mutants. A good test suite should be able to detect or kill a mutant. That is, at least one test case should fail when the test suite is executed with the mutant. Read more. Traditional mutation testing works at the instruction level, e.g., replacing ">" by "<=", so the number of generated mutants is huge, as the time required to check the entire test suite. That's why the authors of Will my tests tell me if I break this code? proposed an Extreme Mutation strategy, which works at the method level.

Extreme Mutation Testing

In Extreme Mutation testing, the whole logic of a method under test is eliminated. All statements in a void method are removed. In other case, the body is replaced by a single return statement. This approach generates fewer mutants. Code from the authors can be found in their GitHub repository.

The goal of Descartes is to bring an effective implementation of this kind of mutation operator into the world of PIT and check its performance in real world projects.

Mutation operators

The goal of extreme mutation operators is to replace the body of a method by one simple return instruction or just remove all instructions if is possible. Descartes supports the following mutation operators:

void mutation operator

This operator accepts a void method and removes all the instructions on its body. For example, with the following class as input:

class A {

  int field = 3;

  public void Method(int inc) {
    field += 3;
  }

}

the mutation operator will generate:

class A {

  int field = 3;

  public void Method(int inc) { }

}

null mutation operator

This operator accepts a method with a reference return type and replaces all instructions with return null. For example, using the following class as input:

class A {
    public A clone() {
        return new A();
    }
}

this operator will generate:

class A {
    public A clone() {
        return null;
    }
}

empty mutation operator

This is a special operator which targets methods that return arrays. It replaces the entire body with a return statement that produces an empty array of the corresponding type. For example, the following class:

class A {
  public int[] getRange(int count) {
    int[] result = new int[count];
    for(int i=0; i < count; i++) {
      result[i] = i;
    }
    return result;
  }
}

will become:

class A {
  public int[] getRange(int count) {
    return new int[0];
  }
}

Constant mutation operator

This operator accepts any method with primitive or String return type. It replaces the method body with a single instruction returning a defined constant. For example, if the integer constant 3 is specified, then for the following class:

class A {
    int field;

    public int getAbsField() {
        if(field >= 0)
            return field;
        return -field;
    }
}

this operator will generate:

class A {
    int field;

    public int getAbsField() {
        return 3;
    }
}

new mutation operator

New in version 1.2.6

This operator accepts any method whose return type has a constructor with no parameters and belongs to a java package. It replaces the code of the method by a single instruction returning a new instance.

For example:

class A {
    int field;
    
    public ArrayList range(int end) {
        ArrayList l = new ArrayList();
        for(int i = 0; i < size; i++) {
            A a = new A();
            a.field = i;
            l.add(a);
        }
        return l;
    }
}  

is transformed to:

class A {
    int field;
    
    public List range(int end) {
        return new ArrayList();
    }
}  

This operator handles the following special cases:

Return Type Replacement
Collection ArrayList
Iterable ArrayList
List ArrayList
Queue LinkedList
Set HashSet
Map HashMap

This means that if a method returns an instance of Collection the code of the mutated method will be return new ArrayList();.

This operator is not enabled by default.

optional mutation operator

New in version 1.2.6

This operator accepts any method whose return type is java.util.Optional. It replaces the code of the method by a single instruction returning an empty instance.

For example:

class A {
    int field;
    
    public Optional<Integer> getOptional() {
        return Optional.of(field);
    }
}  

is transformed to:

class A {
    int field;
    
   public Optional<Integer> getOptional() {
           return Optional.empty();
   }
}  

This operator is not enabled by default.

argument mutation operator

New in version 1.3

This operator replaces the body of a method by returning the value of the first parameter that has the same type as the return type of the method.

For example:

class A {
    public int m(int x, int y) {
        return x + 2 * y;
    }
}

is transformed to:

class A {
    public int m(int x) {
        return x;
    }
}

This operator is not enabled by default.

this mutation operator

New in version 1.3

Replaces the body of a method by return this; if applicable. The goal of this operator is to perform better transformations targeting fluent APIs.

For example:

class A {

    int value = 0;
    public A addOne() {
        value += 1;
        return this;
    }
}

is transformed to:

class A {

    int value = 0;
    public A addOne() {
        return this;
    }
}

This operator is not enabled by default.

Stop Methods

Descartes avoids some methods that are generally not interesting and may introduce false positives such as simple getters, simple setters, empty void methods or methods returning constant values, delegation patterns as well as deprecated and compiler generated methods. Those methods are automatically detected by inspecting their code. A complete list of examples can be found here. The exclusion of stop methods can be configured. For more details see section: "Running Descartes on your project".

Do not use null in methods annotated with @NotNull

New in version 1.2.6

Descartes will avoid using the null operators in methods annotated with @NotNull. This increases its compatibility with Kotlin sources. This feature can be configured. See "Running Descartes on your project" for more details.

Skip methods using @DoNotMutate

New in version 1.3

Descartes skips all method that are annotated with any annotation whose name is DoNotMutate. For example, in the following fragment of code, the method m will not be mutated.

class A {
    @DoNotMutate
    public void m() {...}
}

All methods in a class annotated with @DoNotMutate will be avoided as well. For example, in the following fragment of code, the method m will not be mutated:

@DoNotMutate
class A {
    public void m() {...}
}

The DoNotMutate annotation may specify which operators should be considered. For example:

class A {
    @DoNotMutate(operators = "false")
    public boolean m() { return true; }
}

will instruct Descartes not to use the false mutation operator to mutate m.

When specifying operators, a method annotation takes precedence over class annotations. That, is the @DoNotMutate of a method overrides the same annotation in the class For example:

@DoNotMutate(operators = "true")
class A {

    public boolean n() { return false; }

    @DoNotMutate(operators = "false")
    public boolean m() { return true; }
}

will not mutate method n with true, as instructed in the class annotation. On the other hand, m will be mutated by true but not by false.

Descartes includes a definition of DoNotMutate. However, when the tool inspects the annotations of a class or method it matches only the simple name of the annotation class and ignores the package. So, any DoNotMutate annotation will be considered. In this way a project does not need to add Descartes as a dependency, it can declare its own DoNotMutate and use it.

This feature is also configurable. See "Running Descartes on your project" for more details.

Descartes Output

PIT reporting extensions work with Descartes and include XML, CSV and HTML formats. The HTML format is rather convenient since it also shows the line coverage. Descartes also provides three new reporting extensions:

  • a general reporting extension supporting JSON files. It works also with Gregor, the default mutation engine for PIT. To use just set JSON as report format for PIT.
  • a reporting extension designed for Descartes that generates a JSON file with information about pseudo and partially tested methods. To use just set METHOD as report format for PIT.
  • Descartes can generate a human-readable report containing only the list of methods with testing issues by using the ISSUES format.

Examples of these reporting extensions for Apache Commons-CLI can be checked here.

For more details on how to use and configure these reporting extensions please check section: "Running Descartes on your project". For a more detailed description of the formats see Output Formats.

Running Descartes on your project

Stable releases of Descartes are available from Maven Central. Descartes is a plugin for PIT, so they have to be used together. PIT integrates with majors test and build tools such as Maven, Ant and Gradle.

Using Maven

The minimum configuration to use Descartes in a Maven project is the following:

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

This actually configures PIT for the project, adds Descartes as a dependency of PIT and sets Descartes as the mutation engine to use. Later, one need to run the mutation coverage goal provided by the PIT Maven plugin as follows:

cd my-project-under-test
mvn clean package # ensures clean state
mvn org.pitest:pitest-maven:mutationCoverage
Specifying operators

The operators must be specified in the pom.xml file. Each operator identifier should be added to the mutators element inside the configuration element. void and null operators are identified by void and null respectively. The values for the constant mutation operator can be specified using the regular literal notation used in a Java program. For example true, 1, 2L, 3.0f, 4.0, 'a', "literal", represent boolean, int, long, float, double, char, string constants. Negative values and binary, octal and hexadecimal bases for integer constants are supported as stated by the language specification. In order to specify a byte or short value, a cast-like notation can be used: (short) -1, (byte)0x1A.

The following configuration:

<mutators>
    <mutator>void</mutator>
    <mutator>4</mutator>
    <mutator>"some string"</mutator>
    <mutator>false</mutator>
</mutators>

will instruct the tool to use the void operator. The constant operator will replace the body of every method returning int with return 4; and will use "some string" and false for every string and boolean method.

By default, Descartes uses the following operators:

<mutators>
  <mutator>void</mutator>
  <mutator>null</mutator>
  <mutator>true</mutator>
  <mutator>false</mutator>
  <mutator>empty</mutator>
  <mutator>0</mutator>
  <mutator>1</mutator>
  <mutator>(byte)0</mutator>
  <mutator>(byte)1</mutator>
  <mutator>(short)0</mutator>
  <mutator>(short)1</mutator>
  <mutator>0L</mutator>
  <mutator>1L</mutator>
  <mutator>0.0</mutator>
  <mutator>1.0</mutator>
  <mutator>0.0f</mutator>
  <mutator>1.0f</mutator>
  <mutator>'\40'</mutator>
  <mutator>'A'</mutator>
  <mutator>""</mutator>
  <mutator>"A"</mutator>
</mutators>

All the goals defined by the pitest-maven plugin work with Descartes. For more information check the Maven plugin's web page.

Configuring stop methods

To configure the stop methods under consideration Descartes provides a STOP_METHODS feature. This feature is enabled by default. The parameter exclude can be used to prevent certain methods to be treated as stop methods and bring them back to the analysis. This parameter can take any of the following values:

exclude Method description Example
empty void methods with no instruction. public void m() {}
enum Methods generated by the compiler to support enum types (values and valueOf).
to_string toString methods.
hash_code hashCode methods.
deprecated Methods annotated with @Deprecated or belonging to a class with the same annotation. @Deprecated public void m() {...}
synthetic Methods generated by the compiler.
getter Simple getters. public int getAge() { return this.age; }
setter Simple setters. Includes also fluent simple setters. public void setX(int x) { this.x = x; } and public A setX(int x){ this.x = x; return this; }
constant Methods returning a literal constant. public double getPI() { return 3.14; }
delegate Methods implementing simple delegation. public int sum(int[] a, int i, int j) {return this.adder(a, i, j); }
clinit Static class initializers.
return_this Methods that only return this. public A m() { return this; }
return_param Methods that only return the value of a real parameter public int m(int x, int y) { return y; }
kotlin_setter Setters generated for data classes in Kotlin (New in version 2.1.6)

So, for example, if we don't want to exclude deprecated methods and mutate them the following snippet should be added under the configuration element:

<features>
  <feature>
  <!-- This will allow descartes to mutate deprecated methods -->
    +STOP_METHODS(except[deprecated])
  </feature>
</features>

More than one group can be excluded at the same time:

<features>
  <feature>
  <!-- This will allow descartes to mutate toString and enum generated methods -->
    +STOP_METHODS(except[to_string] except[enum])
  </feature>
</features>

The feature can be completely disabled:

<features>
  <feature>
  <!--No method is considered as a stop method and therefore all of them will be mutated -->
    -STOP_METHODS()
  </feature>
</features>
Configuring reports

As said before, there are several reporting options provided by Descartes:

  • JSON for a general mutation testing report using that file format. It can be used with Gregor.
  • METHODS that produces a methods.json file with the list of all methods analyzed and categorized according to the mutation testing result.
  • ISSUES a human-readable report containing only the methods with testing issues.

They can be configured and combined as regular PIT report formats:

<plugin>
  <groupId>org.pitest</groupId>
  <artifactId>pitest-maven</artifactId>
  <version>1.7.0</version>
  <configuration>
    <outputFormats>
      <value>JSON</value>
      <value>METHODS</value>
      <value>ISSUES</value>
    </outputFormats>
    <mutationEngine>descartes</mutationEngine>
  </configuration>
    <dependencies>
    <dependency>
      <groupId>eu.stamp-project</groupId>
      <artifactId>descartes</artifactId>
      <version>1.3.2</version>
    </dependency>
  </dependencies>
</plugin>

Other filters

From version 1.2.6 Descartes includes AVOID_NULL as a feature preventing the null operator to mutate a method marked with @NotNull. The feature is active by default.

It can be removed by adding the following configuration:

<features>
  <feature>
    -AVOID_NULL()
  </feature>
</features>

From version 1.3 Descartes includes DO_NOT_MUTATE as a feature preventing the mutation of method and classes annotated with @DoNotMutate. The feature is active by default.

It can be removed by adding the following configuration:

<features>
  <feature>
    -DO_NOT_MUTATE()
  </feature>
</features>

From version 1.3 Descartes includes SKIP_SHORT as a feature to skip methods shorter than a given number of lines. The feature is not active by default. To activate add the following configuration:

<features>
  <feature>
    +SKIP_SHORT()
  </feature>
</features>

The number of lines can be configured as follows:

+SKIP_SHORT(lines[3])

The line threshold is equal to 5 by default.

Using Gradle

Follow the instructions to set up PIT for a project that uses Gradle. Add Descartes as a dependency of the pitest task

pitest 'eu.stamp-project:descartes:1.3.2'

then specify descartes in the mutationEngine option inside the plugin configuration.

An example of the final configuration could be:

plugins {
    id 'java'
    id 'info.solidsoft.pitest' version '1.5.1'
}

// Other configurations

repositories {
    mavenCentral()
    mavenLocal()
}

dependencies {
    testImplementation group: 'junit', name: 'junit', version: '4.13.1'
    pitest 'eu.stamp-project:descartes:1.3.2'
}

pitest {
  mutationEngine = "descartes"
  pitestVersion = "1.7.0"
}

The pitestVersion property has to be specified to avoid version issues with the default version shipped with the Gradle plugin. At last, run the pitest task for the project under test:

gradle pitest

Specifying operators

To specify a custom selection of mutation operators, use the operators property in the pitest block as follows:

mutators = [ '1.2', 'true', 'optional', '"a"' ]

This mutates methods returning double values with 1.2, boolean methods with true, methods returning Optional and methods returning String.

See the Maven section for more details on the operator identifiers.

Configuring stop methods

As explained in the Maven section, Descartes skips some methods that are usually of no interest like simple getters and setters. However, these methods can be reincorporated to the analysis using the STOP_METHODS feature. The following removes all stop methods but allows mutating simple setters:

features = ['+STOP_METHODS(except[setter])']

To allow all stop methods do:

features = ['-STOP_METHODS()']

Configuring reports

Descartes custom output formats can be configured as follows:

outputFormats = ['ISSUES', 'METHODS', 'JSON']

Other features

Descartes includes AVOID_NULL and DO_NOT_MUTATE features as explained previously. These are active by default. To disable this features it is enough to add the following configuration to the pitest block:

features = ['-AVOID_NULL()']
features = ['-DO_NOT_MUTATE()']

Running from the command line

Descartes can be used when invoking PIT from the command line. To do this, follow the instructions to run PIT, include Descartes in the classpath specification and add --mutationEngine=descartes.

Installing and building from source

In a terminal, 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

After installing the package, PIT should be able to find the Descartes mutation engine.

More...

Performance

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.

External Links

Articles mentioning Descartes:

License

Descartes is published under LGPL-3.0 (see LICENSE.md for further details).

Contributing

Issues, pull requests and other contributions are welcome.

Funding

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

pitest-descartes's People

Contributors

arnobl avatar bananeweizen avatar bbaudry avatar danglotb avatar danzone avatar dependabot[bot] avatar gluckzhang avatar joaogfarias avatar luandrea avatar monperrus avatar nicolabertazzo avatar nrainer avatar oscarlvp avatar tmortagne avatar vmassol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pitest-descartes's Issues

mutationCoverage failed: Could not load requested engine descartes

Issue Type: possible bug/misuse
Description: I've followed the Descartes for dummies tutorial authored by Nicola Bertazzo. However, I get a

Failed to execute goal org.pitest:pitest-maven:1.2.0:mutationCoverage (default-cli) on project hello_app: Execution default-cli of goal org.pitest:pitest-maven:1.2.0:mutationCoverage failed: Could not load requested engine

after launching Descartes with: mvn test org.pitest:pitest-maven:mutationCoverage in dhell project.
Reproducibility: always
Severity: major
Tool: Descartes PITest, version 19/10/17
Execution Environment: Linux OpenSuse Tumbleweed, Maven version: 3.3.9, Java version: 1.8.0_102, vendor: Oracle Corporation
Steps to reproduce: following Descartes for dummies, I've cloned Descartes from the GitHub repository and installed it using mvn install. I confirm Descartes plugin is installed in my Maven local repository. Then, I've cloned dhell from the repository and build it with mvn clean package. Next, in dhell folder, I've replaced the pom.xml file with pom.xml.for_descartes. Finally, I've executed mvn test org.pitest:pitest-maven:mutationCoverage
Files: See attached the Maven output:
descartes_dhell_dummies_test.txt

Reporter: Yosu Gorroñogoitia [email protected]

Running Descartes-PITest in Supersede IF component (Gradle) outputs: No mutations found

Issue Type: possible bug/misuse
Description: I am testing Descartes PITest in one Atos use case target projects: Supersede, and concretely in the IF component, which is a Gradle configured project, which contains 19 tests passed by issuing gradlet test in command line. This component contains 31 test suites and 167 test, although most of them are not testing in building the component with Gradle, but this can be changed if needed for testing Descartes.
Descartes PITEST was configured in build.gradle following instructions given in Descartes GitHub readme.md. Descartes was obtained from Github, by cloning the repository, installed after mvn compile test install. As a summary of results, this is a snippet of Descartes output:
Exception in thread "main" org.pitest.help.PitHelpError: No mutations found. This probably means there is an issue with either the supplied classpath or filters.
See Steps to Reproduce section for further details.
Reproducibility: always
Severity: major
Tool: Descartes PITest, version 28/08/17
Execution Environment: Linux OpenSuse Tumbleweed
Steps to reproduce:
Descartes was tested in one component, IF, of the Supersede Integration framework. To get this framework:
git clone https://github.com/supersede-project/integration.git -b descartes
Then, go to the IF project:
cd integration/IF/API/eu.supersede.if.api/
And execute Descartes:
gradle pitest
Files:
I attach the full log of executing Descartes:
Descartes_PIT_MutationCoverage_Supersede_IF_Gradle.txt
Relationships: None
Reporter: Yosu Gorroñogoitia [email protected]

mutate void methods

First focus on methods that return void: the mutation operator removes the body of the method

PIT/Descartes don't notice tests in test classes using custom test suites/runners using @RunWith

Using Descartes build from master on 2017-11-17, around 13:15 CET (0.2-SNAPSHOT).

To reproduce:

  • git clone https://github.com/xwiki/xwiki-platform.git
  • cd xwiki-platform/xwiki-platform-core/xwiki-platform-formula/xwiki-platform-formula-macro
  • Edit pom.xml and add the following:
      <plugin>
        <groupId>org.pitest</groupId>
        <artifactId>pitest-maven</artifactId>
        <version>1.2.0</version>
        <configuration>
          <mutationEngine>descartes</mutationEngine>
          <mutators>
            <mutator>void</mutator>
            <mutator>null</mutator>
            <mutator>true</mutator>
            <mutator>false</mutator>
            <mutator>empty</mutator>
            <mutator>0</mutator>
            <mutator>1</mutator>
            <mutator>(byte)0</mutator>
            <mutator>(byte)1</mutator>
            <mutator>(short)1</mutator>
            <mutator>(short)2</mutator>
            <mutator>0L</mutator>
            <mutator>1L</mutator>
            <mutator>0.0</mutator>
            <mutator>1.0</mutator>
            <mutator>0.0f</mutator>
            <mutator>1.0f</mutator>
            <mutator>'\40'</mutator>
            <mutator>'A'</mutator>
            <mutator>""</mutator>
            <mutator>"A"</mutator>
          </mutators>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>fr.inria.stamp</groupId>
            <artifactId>descartes</artifactId>
            <version>0.2-SNAPSHOT</version>
          </dependency>
        </dependencies>

Result: 0% test coverage and 0% mutation score.

screen shot 2017-11-17 at 13 15 33

Several XWiki commons modules report 0 mutation score

When running pitest/descartes on xwiki-commons using a threshold to fail the build, I noticed several modules that generate 0% mutation score even though they have several tests. Namely:

  • xwiki-commons-text
  • xwiki-commons-cache-infinispan
  • xwiki-commons-extension-handler-jar
  • xwiki-commons-observation

For the first one xwiki-commons-text it can be explained by the fact that it uses JUnit5 tests. However the other ones are using JUnit4.

Also note that the target/test-classes directories correctly contain the test classes.

I've attached the zip of target/pit-reports for xwiki-commons-cache-infinispan at https://up1.xwikisas.com/#YBg00VTYn3l82nxtafX3yg in case it can help.

Here's the console output for this module:

...
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ xwiki-commons-cache-infinispan ---

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
objc[9680]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/java (0x10ed7d4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x110df14e0). One of the two will be used. Which one is undefined.
Running org.xwiki.cache.infinispan.InfinispanCacheTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.331 sec - in org.xwiki.cache.infinispan.InfinispanCacheTest
Running org.xwiki.cache.infinispan.InfinispanConfigTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.557 sec - in org.xwiki.cache.infinispan.InfinispanConfigTest

Results :

Tests run: 12, Failures: 0, Errors: 0, Skipped: 0
...
[INFO] --- pitest-maven:1.2.0:mutationCoverage (pitest-check) @ xwiki-commons-cache-infinispan ---
[INFO] Found plugin : JSON report plugin
[INFO] Found plugin : Default csv report plugin
[INFO] Found plugin : Default xml report plugin
[INFO] Found plugin : Default html report plugin
[INFO] Found plugin : Default limit mutations plugin
[INFO] Found plugin : Kotlin junk mutations filter
[INFO] Found shared classpath plugin : Engine for extreme mutation operators
[INFO] Found shared classpath plugin : Default mutation engine
[INFO] Adding fr.inria.stamp:descartes to SUT classpath
[INFO] Adding org.pitest:pitest to SUT classpath
[INFO] Mutating from /Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-infinispan/target/classes
[INFO] Defaulting target classes to match packages in build directory
8:44:59 AM PIT >> INFO : Verbose logging is disabled. If you encounter an problem please enable it before reporting an issue.
CP is :/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-infinispan/target/test-classes:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-infinispan/target/classes:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-api/target/xwiki-commons-cache-api-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-configuration/xwiki-commons-configuration-api/target/xwiki-commons-configuration-api-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-api/target/xwiki-commons-component-api-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-stability/target/xwiki-commons-stability-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-text/target/xwiki-commons-text-10.3-SNAPSHOT.jar:/Users/vmassol/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/Users/vmassol/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar:/Users/vmassol/.m2/repository/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.jar:/Users/vmassol/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-environment/xwiki-commons-environment-api/target/xwiki-commons-environment-api-10.3-SNAPSHOT.jar:/Users/vmassol/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar:/Users/vmassol/.m2/repository/org/infinispan/infinispan-core/8.2.6.Final/infinispan-core-8.2.6.Final.jar:/Users/vmassol/.m2/repository/org/infinispan/infinispan-commons/8.2.6.Final/infinispan-commons-8.2.6.Final.jar:/Users/vmassol/.m2/repository/org/jgroups/jgroups/3.6.7.Final/jgroups-3.6.7.Final.jar:/Users/vmassol/.m2/repository/org/jboss/marshalling/jboss-marshalling-osgi/2.0.0.Beta3/jboss-marshalling-osgi-2.0.0.Beta3.jar:/Users/vmassol/.m2/repository/org/jboss/logging/jboss-logging/3.3.2.Final/jboss-logging-3.3.2.Final.jar:/Users/vmassol/.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-tests/target/xwiki-commons-cache-tests-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-tools/xwiki-commons-tool-test/xwiki-commons-tool-test-component/target/xwiki-commons-tool-test-component-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-tools/xwiki-commons-tool-test/xwiki-commons-tool-test-simple/target/xwiki-commons-tool-test-simple-10.3-SNAPSHOT.jar:/Users/vmassol/.m2/repository/junit/junit/4.12/junit-4.12.jar:/Users/vmassol/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/Users/vmassol/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.1.0/junit-jupiter-api-5.1.0.jar:/Users/vmassol/.m2/repository/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar:/Users/vmassol/.m2/repository/org/opentest4j/opentest4j/1.0.0/opentest4j-1.0.0.jar:/Users/vmassol/.m2/repository/org/junit/platform/junit-platform-commons/1.1.0/junit-platform-commons-1.1.0.jar:/Users/vmassol/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.1.0/junit-jupiter-engine-5.1.0.jar:/Users/vmassol/.m2/repository/org/junit/platform/junit-platform-engine/1.1.0/junit-platform-engine-1.1.0.jar:/Users/vmassol/.m2/repository/org/junit/platform/junit-platform-launcher/1.1.0/junit-platform-launcher-1.1.0.jar:/Users/vmassol/.m2/repository/org/junit/vintage/junit-vintage-engine/5.1.0/junit-vintage-engine-5.1.0.jar:/Users/vmassol/.m2/repository/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar:/Users/vmassol/.m2/repository/org/jmock/jmock/2.6.0/jmock-2.6.0.jar:/Users/vmassol/.m2/repository/org/jmock/jmock-junit4/2.6.0/jmock-junit4-2.6.0.jar:/Users/vmassol/.m2/repository/org/mockito/mockito-core/2.15.0/mockito-core-2.15.0.jar:/Users/vmassol/.m2/repository/net/bytebuddy/byte-buddy/1.7.9/byte-buddy-1.7.9.jar:/Users/vmassol/.m2/repository/net/bytebuddy/byte-buddy-agent/1.7.9/byte-buddy-agent-1.7.9.jar:/Users/vmassol/.m2/repository/org/objenesis/objenesis/2.6/objenesis-2.6.jar:/Users/vmassol/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/Users/vmassol/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/Users/vmassol/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar:/Users/vmassol/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-observation/xwiki-commons-observation-api/target/xwiki-commons-observation-api-10.3-SNAPSHOT.jar:/Users/vmassol/.m2/repository/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar:/Users/vmassol/.m2/repository/jmock/jmock/1.2.0/jmock-1.2.0.jar:/Users/vmassol/.m2/repository/jmock/jmock-cglib/1.2.0/jmock-cglib-1.2.0.jar:/Users/vmassol/.m2/repository/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/target/xwiki-commons-component-default-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-observation/target/xwiki-commons-component-observation-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-context/target/xwiki-commons-context-10.3-SNAPSHOT.jar:/Users/vmassol/.m2/repository/fr/inria/stamp/descartes/0.2-SNAPSHOT/descartes-0.2-SNAPSHOT.jar:/Users/vmassol/.m2/repository/org/pitest/pitest/1.2.0/pitest-1.2.0.jar
8:44:59 AM PIT >> INFO : MINION : objc[9681]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/java (0x107e304c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x108f02
8:44:59 AM PIT >> INFO : MINION : 4e0). One of the two will be used. Which one is undefined.

8:44:59 AM PIT >> INFO : Sending 0 test classes to minion
8:44:59 AM PIT >> INFO : Sent tests to minion
8:45:00 AM PIT >> INFO : MINION : 8:45:00 AM PIT >> INFO : Checking environment

8:45:00 AM PIT >> INFO : MINION : 8:45:00 AM PIT >> INFO : Found  0 tests

8:45:00 AM PIT >> INFO : MINION : 8:45:00 AM PIT >> INFO : Dependency analysis reduced number of potential tests by 0

8:45:00 AM PIT >> INFO : MINION : 8:45:00 AM PIT >> INFO : 0 tests received

8:45:00 AM PIT >> INFO : Calculated coverage in 0 seconds.
8:45:00 AM PIT >> INFO : Created  4 mutation test units
8:45:00 AM PIT >> INFO : Completed in 0 seconds

So for some reasons it's not finding the tests.

Custom JSON report for Descartes

Descartes relies on PIT for reporting. Nevertheless, it would be nice to have a report with the classification in strong/weak pseudo tested or tested for each method rather than having the raw mutation score. This report should contain the mutations applied to each method, the status for each mutant and the covering tests.

No mutations found. This probably means there is an issue with either the supplied classpath or filters

Issue Type: possible bug/misuse
Description: Following the Descartes for dummies tutorial this time I use the pom.xml file provided by Niccola in his page. Appliying Descartes to dhell project this time reports:

No mutations found. This probably means there is an issue with either the supplied classpath or filters.

Reproducibility: always
Severity: major
Tool: Descartes PITest, version 19/10/17
Execution Environment: Linux OpenSuse Tumbleweed
Steps to reproduce: Similar steps described in #25. The only difference is that the pom.xml file for dhell project is this one
Files: See Maven execution logs attached.
descartes_dhell_dummies_test_v2.txt

Relationships: #25
Reporter: Yosu Gorroñogoitia [email protected]

Running Descartes-PITest in Supersede DM Optimizer component generates mutations but no tests are executed.

Issue Type: possible bug/misuse
Description: I am testing Descartes PITest in one Atos use case target projects: Supersede, and concretely in the DM Optimizer component, which is a Maven configured project, which contains 7 tests passsed by issueing mvn test in command line.
Descartes PITEST was configured in pom.xml following instructions given in Descartes GitHub readme.md. Descartes was obtained from Github, by cloning the repository, installed after mvn compile test install. As a summary of results, this is a snippet of Descartes output:

Generated 264 mutations Killed 0 (0%) Ran 0 tests (0 tests per mutation)

See Steps to Reproduce section for further details.
Reproducibility: always
Severity: major
Tool: Descartes PITest, version 28/08/17
Execution Environment: Linux OpenSuse Tumbleweed
Steps to reproduce:
Descartes was tested in one component, DM Optimizer, of the Supersede Dynamic Adaptation framework. To get this framework:
git clone https://github.com/supersede-project/dyn_adapt.git -b descartes
Then, build the framework components (it requires a Linux OS):
cd dyn_adpt;./buildAll.sh
Then, go to the DM optimizer project:
cd DM/components/eu.supersede.dynadapt.dm.optimizer/
An execute Descartes:
mvn org.pitest:pitest-maven:mutationCoverage
Files:
I attach the full log of executing Descartes:
Descartes_PIT_MutationCoverage_Supersede_DM_Optimizer_Maven.txt
I also attach the log of executing the DM Optimizer test, showing 7 test executed:
Supersede_DM_Optimizer_Maven_Test.txt
Relationships: None
Reporter: Yosu Gorroñogoitia [email protected]

@Ignore (org.junit.Ignore) is not working when used to clean a test suite. This is not a Descartes issue, but a PITest issue

Characteristics

  • Issue Type: bug
  • Reproducibility: always
  • Severity: major
  • Tool/Service/Component: Descartes/PITest, version (27/03/2018, 1.2.0)
  • Execution Environment: Linux Opensuse Tumbleweed
  • Reporter: Jesús Gorroñogoitia ([email protected])

Descartes PITest requires a green suite before amplifying it. A way to fix a red suite is to mark as @ignore (org.junit.Ignore) the tests within the suite that fails. This works well in Maven, so mvn tests executes correctly, but not in Descartes/PITest, which still spots these tests as failing. Therefore, the only way to provide a clean test is either by commenting out or remove them.

Steps to reproduce

N/A (A concrete Supersede IF example could be provided if required)

Other files and URLs

N/A

Relationships

N/A

Descartes complains of non-green suite that passes well by Maven. JUnit @Ignore seems not to be working

Issue Type: possible bug or need for improvement
Description: Following #27 I fixed the Atos Supersede IF project test suites so they all were correctly passed by Maven. I did this by combining direct fixes in the test suites with the usage of JUnit @ignore for those tests I couldn't fix because they only work under complex testing setups.
But Descartes still complains that the suite is not green. It seems that the test suites that fail are only those which require to read certain system properties that are passed within the pom_for_descartes.xml in the configuration of the maven-surefire-plugin:
<systemProperties> <property> <name>is.admin.user</name> <value>admin</value> </property> <property> <name>is.admin.passwd</name> <value>$2pRSid#</value> </property> </systemProperties>
The other tests suites passed well.

Reproducibility: always
Severity: normal
Tool: Descartes PITest, version 24/10/17
Execution Environment: Linux OpenSuse Tumbleweed
Steps to reproduce: Follow the same procedure that in #27
Files:
Relationships: #27
Reporter: Yosu Gorroñogoitia [email protected]

Tellu usecase test report

Today, 20.12.2017, I have tried Descartes on one Tellu project. Called tellulib, I selected it because it is a fairly small single-module maven project with a decent set of straight-forward unit tests which execute quickly.

I built the current version from GitHub, and used the config suggested in the readme. It ran fine.
Result: Generated 754 mutations Killed 261 (35%). Runtime was 46 seconds.

For comparison, running PIT with default config (no Descartes): Generated 2941 mutations Killed 860 (29%). Runtime 113 seconds.

Execute Descartes on SAT4J core (try again based on Oscar's comment)

Steps to reproduce:

git clone https://gitlab.ow2.org/sat4j/sat4j.git

cd sat4j/org.sat4j.core
mvn clean install

Modify the pom.xml to include the Descartes plugin, then run mvn org.pitest:pitest-maven:mutationCoverage -DmutationEngine=descartes

One gets the following errors:

\12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT1(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
|12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT10(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
/12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT11(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
-12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT12(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
\12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT13(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
|12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT14(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
/12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT15(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
-12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT16(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
\12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT2(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
|12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT3(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
/12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT4(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
-12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT5(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
\12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT6(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
|12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT7(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
/12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT8(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
-12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50SAT9(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
\12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50UNSAT1(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
|12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50UNSAT2(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
/12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50UNSAT3(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
-12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50UNSAT4(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
\12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50UNSAT5(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
|12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50UNSAT6(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.
/12:59:54 PM PIT >> SEVERE : Description [testClass=org.sat4j.minisat.M2MiniLearningTest, name=testAim50UNSAT7(org.sat4j.minisat.M2MiniLearningTest)] did not pass without mutation.

while the tests are reported to be passing when executing mvn clean install

Propose CI service for running mutation testing

Create an infrastructure for an extreme mutation service using Github hooks.

  • create a Jenkins job that fails in the presence of pseudo-tested methods.
  • work only on the methods that have been changed.

Improve Report to visibly show jacoco-covered code with unkilled mutants

Right now it takes a lot of time to navigate in the PIT Report and find some valid test to improve.

Most of the time you find either:

  • Mutants not killed but on code without coverage (and thus it's normal that the mutants are not killed since there are no tests ;))
  • Mutants killed

What's interesting is when there are non-killed mutants but on code which has coverage (ie which has tests).

It would be nice if the report could make it simpler to identify those cases and thus make it much simpler to identify which tests should be improved.

Exclude deprecated methods

Some pseudo-tested methods are marked as deprecated. They should be skipped from the analysis as another type of stop method.

Add a reporting extension

PIT's default report format is more general and focused in lines of code. Add a reporter that focuses on pseudo tested methods.

Unstable mutation coverage percentages

When I run pitest/descartes on some xwiki modules, I get different percentage values across runs. for example I had 69% of xwiki-commons-crypto-common and I've set the build to fail if it gets below that values.

Without making any change to that module when I ran it today, the build failed with:

xwiki-commons-crypto-common: Mutation score of 68 is below threshold of 69

It's important that the number be stable. Any idea what could cause this?

big use case

pass descartes with void method removal on the xwiki code base

Handle multimodule projects

Given a multimodule project PIT will work with each submodule independently. There are projects in which test cases covering the code of a submodule are placed outside of it. In such cases, mutants that survive the tests placed in the same submodule could be killed by test cases of other submodules. This is an issue that has been around for a while and spotted by the PIT's community several times (See hcoles/pitest#41 hcoles/pitest#224 hcoles/pitest#307 hcoles/pitest#323) Right now we have a workaround in which we treat the entire project as one by merging all classpaths but this has more issues. For one thing, there could be dependency issues when merging the classpaths, on the other hand, the correct working directory for each tests is lost, as PIT assumes the same for every test case.
A possible solution for this problem could address two specific tasks:

  • Create a Maven aggregator plugin that gather the dependency information among submodules. With this information, identify for each submodule groups of test cases with their classpath and working directory.
  • Complement the Maven plugin by making the tests run in their corresponding working directory. Changing PIT's code for would mean change parts of its design in deep components. A better solution could be to use PIT by running the analysis on each of the groups of test cases identified for each submodule and then aggregate the results. This second approach should be easier but could impact the execution time.

Add support to mutate constructors

Constructors are different from void methods. They should call the constructor of the parent class. A mutation that could be performed is to remove the code and only invoke the parent's constructor with default values.

Improve the report to indicate code that is directly exercised by tests

Right now the following can happen: tests can exercise some code indirectly (i.e. not test this code explicitly) and descartes can then report that some mutants were not killed. However in practice this code is not tested and it's the same situation as not having tests at all as far as this code is concerned.

The really interesting cases are when unkilled mutants belong to methods that are directly called from the test methods. It would be nice to be able to show this clearly in the report to make it simpler to find hot spots to fix.

Does it make sense? :)

Problem with gpg after the instalation of Descartes in Windows 7

Characteristics

  • Issue Type: possible bug

  • Reproducibility: always

  • Severity: major

  • Tool/Service/Component: pitest-descartes

  • Execution Environment: Windows 7 Enterprise

  • Reporters: Yosu Gorroñogoitia [email protected]
    & Ricardo José Tejada [email protected]

Description

An exception is thrown when running the tests after the instalation of Descartes because gpg.exe is not found.

"Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) on project descartes:
Unable to execute gpg command: Error while executing process. Cannot run program "gpg.exe": CreateProcess error=2"

Steps to reproduce

Follow the instructions to install Descartes, after "mvn install" the exception is thrown when running the tests

Other files and URLs

DescartesInstalationTestsProblem.txt

Help on issue template

Preview to follow the link or open file .github/ISSUE_DOC.md
DescartesInstalationTestsProblem.txt

Can we run Descartes from command line without modify the pom.xml

Hi, I am currently re-implementing pitest-descartes inside DSpot.

I would like to run the mutation analysis through maven goal (or any other tools like gradle or ant).

Currently, I use the goal org.pitest:pitest-maven:1.3.0:mutationCoverage and specify a bunch of options using -Dpropery=value. For instance, I specify the mutation engine and the mutators as follow:
-DmutationEngines=gregor -Dmutators=ALL.

The problem is, that I cannot do the same with pitest-descartes.

I tried to specify the specific engine and mutators with:
-DmutationEngines=descartes -Dmutators=void,null,true,false
but it seems that PIT does not recognize the mutators:

[ERROR] Failed to execute goal org.pitest:pitest-maven:1.3.0:mutationCoverage (default-cli) on project example: Execution default-cli of goal org.pitest:pitest-maven:1.3.0:mutationCoverage failed: Mutator or group void is unknown. Check PIT configuration and try again.
[ERROR] See http://pitest.org for more details.

Do you think it is possible to do so? It would be great, otherwise, we would have to modify the pom of the client project, which is not very convenient, (It is what it was done before...).

WDYT?

Release and Deploy 0.2

Hello,

What do you think about a new release and a deployment on the maven repository on GH?

Cheers,

Benjamin

Failure to run on xwiki-commons-job

When executing on xwiki-commons-job I get the following failure below.

[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ xwiki-commons-job ---

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
objc[4501]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/java (0x10486d4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x10492b4e0). One of the two will be used. Which one is undefined.
Running org.xwiki.job.internal.DefaultJobStatusTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.887 sec - in org.xwiki.job.internal.DefaultJobStatusTest
Running org.xwiki.job.internal.DefaultRequestTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in org.xwiki.job.internal.DefaultRequestTest
Running org.xwiki.job.internal.DefaultJobStatusStoreTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.826 sec - in org.xwiki.job.internal.DefaultJobStatusStoreTest
Running org.xwiki.job.internal.JobStatusSerializerTest
Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.244 sec - in org.xwiki.job.internal.JobStatusSerializerTest
Running org.xwiki.job.internal.DefaultJobProgressTest
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.077 sec - in org.xwiki.job.internal.DefaultJobProgressTest
Running org.xwiki.job.internal.DefaultJobExecutorTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.102 sec - in org.xwiki.job.internal.DefaultJobExecutorTest
Running org.xwiki.job.internal.DefaultJobManagerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.045 sec - in org.xwiki.job.internal.DefaultJobManagerTest
Running org.xwiki.job.internal.xstream.XStreamUtilsTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in org.xwiki.job.internal.xstream.XStreamUtilsTest
Running org.xwiki.job.internal.xstream.SafeXStreamTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.035 sec - in org.xwiki.job.internal.xstream.SafeXStreamTest

Results :

Tests run: 56, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ xwiki-commons-job ---
[INFO] Building jar: /Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-job/target/xwiki-commons-job-10.3-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-checkstyle-plugin:3.0.0:check (default) @ xwiki-commons-job ---
[INFO] Starting audit...
[WARN] /Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-job/src/main/java/org/xwiki/job/internal/xstream/SafeMessageConverter.java:109: Comment matches to-do format 'TODO'. [TodoComment]
[WARN] /Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-job/src/main/java/org/xwiki/job/internal/xstream/SafeXStream.java:36: Comment matches to-do format 'FIXME'. [TodoComment]
[WARN] /Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-job/src/main/java/org/xwiki/job/internal/xstream/SafeXStream.java:66: Comment matches to-do format 'TODO'. [TodoComment]
[WARN] /Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-job/src/main/java/org/xwiki/job/internal/xstream/SafeXStream.java:73: Comment matches to-do format 'FIXME'. [TodoComment]
Audit done.
[INFO] 
[INFO] --- maven-checkstyle-plugin:3.0.0:check (blocker) @ xwiki-commons-job ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- license-maven-plugin:3.0:check (default) @ xwiki-commons-job ---
[INFO] Checking licenses...
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.0:check (jacoco-check) @ xwiki-commons-job ---
[INFO] Loading execution data file /Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-job/target/jacoco.exec
[INFO] Analyzed bundle 'xwiki-commons-job' with 58 classes
[INFO] All coverage checks have been met.
[INFO] 
[INFO] --- pitest-maven:1.2.0:mutationCoverage (pitest-check) @ xwiki-commons-job ---
[INFO] Found plugin : JSON report plugin
[INFO] Found plugin : Default csv report plugin
[INFO] Found plugin : Default xml report plugin
[INFO] Found plugin : Default html report plugin
[INFO] Found plugin : Default limit mutations plugin
[INFO] Found plugin : Kotlin junk mutations filter
[INFO] Found shared classpath plugin : Engine for extreme mutation operators
[INFO] Found shared classpath plugin : Default mutation engine
[INFO] Adding fr.inria.stamp:descartes to SUT classpath
[INFO] Adding org.pitest:pitest to SUT classpath
[INFO] Mutating from /Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-job/target/classes
[INFO] Defaulting target classes to match packages in build directory
4:24:10 PM PIT >> INFO : Verbose logging is disabled. If you encounter an problem please enable it before reporting an issue.
CP is :/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-job/target/test-classes:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-job/target/classes:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-api/target/xwiki-commons-component-api-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-stability/target/xwiki-commons-stability-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-text/target/xwiki-commons-text-10.3-SNAPSHOT.jar:/Users/vmassol/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/Users/vmassol/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-api/target/xwiki-commons-cache-api-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-logging/xwiki-commons-logging-api/target/xwiki-commons-logging-api-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-observation/xwiki-commons-observation-api/target/xwiki-commons-observation-api-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-environment/xwiki-commons-environment-api/target/xwiki-commons-environment-api-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-configuration/xwiki-commons-configuration-api/target/xwiki-commons-configuration-api-10.3-SNAPSHOT.jar:/Users/vmassol/.m2/repository/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.jar:/Users/vmassol/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-context/target/xwiki-commons-context-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-script/target/xwiki-commons-script-10.3-SNAPSHOT.jar:/Users/vmassol/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar:/Users/vmassol/.m2/repository/org/apache/commons/commons-collections4/4.1/commons-collections4-4.1.jar:/Users/vmassol/.m2/repository/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar:/Users/vmassol/.m2/repository/org/apache/commons/commons-configuration2/2.2/commons-configuration2-2.2.jar:/Users/vmassol/.m2/repository/com/thoughtworks/xstream/xstream/1.4.10/xstream-1.4.10.jar:/Users/vmassol/.m2/repository/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar:/Users/vmassol/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-tools/xwiki-commons-tool-test/xwiki-commons-tool-test-component/target/xwiki-commons-tool-test-component-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-tools/xwiki-commons-tool-test/xwiki-commons-tool-test-simple/target/xwiki-commons-tool-test-simple-10.3-SNAPSHOT.jar:/Users/vmassol/.m2/repository/junit/junit/4.12/junit-4.12.jar:/Users/vmassol/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/Users/vmassol/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.1.0/junit-jupiter-api-5.1.0.jar:/Users/vmassol/.m2/repository/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar:/Users/vmassol/.m2/repository/org/opentest4j/opentest4j/1.0.0/opentest4j-1.0.0.jar:/Users/vmassol/.m2/repository/org/junit/platform/junit-platform-commons/1.1.0/junit-platform-commons-1.1.0.jar:/Users/vmassol/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.1.0/junit-jupiter-engine-5.1.0.jar:/Users/vmassol/.m2/repository/org/junit/platform/junit-platform-engine/1.1.0/junit-platform-engine-1.1.0.jar:/Users/vmassol/.m2/repository/org/junit/platform/junit-platform-launcher/1.1.0/junit-platform-launcher-1.1.0.jar:/Users/vmassol/.m2/repository/org/junit/vintage/junit-vintage-engine/5.1.0/junit-vintage-engine-5.1.0.jar:/Users/vmassol/.m2/repository/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar:/Users/vmassol/.m2/repository/org/jmock/jmock/2.6.0/jmock-2.6.0.jar:/Users/vmassol/.m2/repository/org/jmock/jmock-junit4/2.6.0/jmock-junit4-2.6.0.jar:/Users/vmassol/.m2/repository/org/mockito/mockito-core/2.15.0/mockito-core-2.15.0.jar:/Users/vmassol/.m2/repository/net/bytebuddy/byte-buddy/1.7.9/byte-buddy-1.7.9.jar:/Users/vmassol/.m2/repository/net/bytebuddy/byte-buddy-agent/1.7.9/byte-buddy-agent-1.7.9.jar:/Users/vmassol/.m2/repository/org/objenesis/objenesis/2.6/objenesis-2.6.jar:/Users/vmassol/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/Users/vmassol/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/Users/vmassol/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar:/Users/vmassol/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar:/Users/vmassol/.m2/repository/jmock/jmock/1.2.0/jmock-1.2.0.jar:/Users/vmassol/.m2/repository/jmock/jmock-cglib/1.2.0/jmock-cglib-1.2.0.jar:/Users/vmassol/.m2/repository/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/target/xwiki-commons-component-default-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-observation/xwiki-commons-observation-local/target/xwiki-commons-observation-local-10.3-SNAPSHOT.jar:/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-observation/target/xwiki-commons-component-observation-10.3-SNAPSHOT.jar:/Users/vmassol/.m2/repository/fr/inria/stamp/descartes/0.2-SNAPSHOT/descartes-0.2-SNAPSHOT.jar:/Users/vmassol/.m2/repository/org/pitest/pitest/1.2.0/pitest-1.2.0.jar
4:24:10 PM PIT >> INFO : MINION : objc[4502]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/java (0x10e6794c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x10e705
4:24:10 PM PIT >> INFO : MINION : 4e0). One of the two will be used. Which one is undefined.

4:24:10 PM PIT >> INFO : Sending 27 test classes to minion
4:24:10 PM PIT >> INFO : Sent tests to minion
4:24:10 PM PIT >> INFO : MINION : 4:24:10 PM PIT >> INFO : Checking environment

4:24:10 PM PIT >> INFO : MINION : 4:24:10 PM PIT >> INFO : Found  56 tests

4:24:10 PM PIT >> INFO : MINION : 4:24:10 PM PIT >> INFO : Dependency analysis reduced number of potential tests by 0
4:24:10 PM PIT >> INFO : 56 tests received

4:24:11 PM PIT >> INFO : MINION : 4:24:11 PM PIT >> WARNING : More threads at end of test (5) testGetJobStatusForUnexistingJob(org.xwiki.job.internal.DefaultJobManagerTest) than start. (4)

4:24:11 PM PIT >> SEVERE : Description [testClass=org.xwiki.job.internal.DefaultJobStatusStoreTest, name=getJobStatusInOldPlace(org.xwiki.job.internal.DefaultJobStatusStoreTest)] did not pass without mutation.
4:24:11 PM PIT >> SEVERE : Description [testClass=org.xwiki.job.internal.DefaultJobStatusStoreTest, name=getJobStatusInWrongPlaceAndWithInvalidLogArgument(org.xwiki.job.internal.DefaultJobStatusStoreTest)] did not pass without mutation.
4:24:12 PM PIT >> INFO : Calculated coverage in 2 seconds.
|[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] XWiki Commons - Parent POM ......................... SUCCESS [  2.578 s]
[INFO] XWiki Commons - Tools - Parent POM ................. SUCCESS [  0.046 s]
[INFO] XWiki Commons - Tools - License Resources .......... SUCCESS [  0.954 s]
[INFO] XWiki Commons - Tools - Enforcers .................. SUCCESS [  0.756 s]
[INFO] XWiki Commons - Tools - Banned Dependencies Enforcer SUCCESS [  0.881 s]
[INFO] XWiki Commons - Tools - Verification Resources ..... SUCCESS [  8.495 s]
[INFO] XWiki Commons - Tools - Spoon Processor ............ SUCCESS [  0.342 s]
[INFO] XWiki Commons - Root POM ........................... SUCCESS [  0.885 s]
[INFO] XWiki Commons - Tools - Test Framework - Parent POM  SUCCESS [  0.850 s]
[INFO] XWiki Commons - Tools - Test Framework - Simple .... SUCCESS [  5.680 s]
[INFO] XWiki Commons - Core - Parent POM .................. SUCCESS [  0.557 s]
[INFO] XWiki Commons - Stability .......................... SUCCESS [  2.040 s]
[INFO] XWiki Commons - Text ............................... SUCCESS [  3.292 s]
[INFO] XWiki Commons - Component - Parent POM ............. SUCCESS [  0.132 s]
[INFO] XWiki Commons - Component - API .................... SUCCESS [  9.964 s]
[INFO] XWiki Commons - Observation - Parent POM ........... SUCCESS [  0.158 s]
[INFO] XWiki Commons - Observation - API .................. SUCCESS [ 10.699 s]
[INFO] XWiki Commons - Component - Observation ............ SUCCESS [  4.680 s]
[INFO] XWiki Commons - Component - Default Implementation . SUCCESS [ 16.406 s]
[INFO] XWiki Commons - Context ............................ SUCCESS [  8.160 s]
[INFO] XWiki Commons - Configuration - Parent POM ......... SUCCESS [  0.235 s]
[INFO] XWiki Commons - Configuration - API ................ SUCCESS [  0.816 s]
[INFO] XWiki Commons - Tools - Test Framework - Component . SUCCESS [  0.547 s]
[INFO] XWiki Commons - Blame .............................. SUCCESS [  0.435 s]
[INFO] XWiki Commons - Blame - API ........................ SUCCESS [  5.099 s]
[INFO] XWiki Commons - Loggging ........................... SUCCESS [  0.173 s]
[INFO] XWiki Commons - Logging - API ...................... SUCCESS [ 12.549 s]
[INFO] XWiki Commons - Diff ............................... SUCCESS [  0.179 s]
[INFO] XWiki Commons - Diff API ........................... SUCCESS [  8.062 s]
[INFO] XWiki Commons - Diff Display API ................... SUCCESS [ 10.986 s]
[INFO] XWiki Commons - Script ............................. SUCCESS [  9.102 s]
[INFO] XWiki Commons - Blame - Script Service ............. SUCCESS [  0.834 s]
[INFO] XWiki Commons - Environment - Parent POM ........... SUCCESS [  0.166 s]
[INFO] XWiki Commons - Environment - API .................. SUCCESS [  0.568 s]
[INFO] XWiki Commons - Cache - Parent POM ................. SUCCESS [  0.144 s]
[INFO] XWiki Commons - Cache - API ........................ SUCCESS [  0.923 s]
[INFO] XWiki Commons - Cache - Tests ...................... SUCCESS [  0.781 s]
[INFO] XWiki Commons - Cache - Infinispan ................. SUCCESS [ 10.365 s]
[INFO] XWiki Commons - ClassLoader - Parent POM ........... SUCCESS [  0.086 s]
[INFO] XWiki Commons - ClassLoader - API .................. SUCCESS [  0.882 s]
[INFO] XWiki Commons - ClassLoader - Protocols - Parent POM SUCCESS [  0.093 s]
[INFO] XWiki Commons - ClassLoader - Protocols - JAR ...... SUCCESS [  0.819 s]
[INFO] XWiki Commons - Component - Component Archetype .... SUCCESS [  7.673 s]
[INFO] XWiki Commons - Crypto ............................. SUCCESS [  0.270 s]
[INFO] XWiki Commons - Crypto - Common API ................ SUCCESS [08:43 min]
[INFO] XWiki Commons - Crypto - Cipher API ................ SUCCESS [ 18.577 s]
[INFO] XWiki Commons - Crypto - Password API .............. SUCCESS [ 36.317 s]
[INFO] XWiki Commons - Crypto - Signer API ................ SUCCESS [ 19.847 s]
[INFO] XWiki Commons - Crypto - PKI API ................... SUCCESS [ 42.393 s]
[INFO] XWiki Commons - Crypto - Store ..................... SUCCESS [  0.267 s]
[INFO] XWiki Commons - Cryptographic Services - Storage API SUCCESS [  0.910 s]
[INFO] XWiki Commons - Cryptographic Services - Storage Filesystem SUCCESS [  8.149 s]
[INFO] XWiki Commons - Environment - Common ............... SUCCESS [  0.647 s]
[INFO] XWiki Commons - Environment - Standard ............. SUCCESS [  5.194 s]
[INFO] XWiki Commons - Environment - Servlet .............. SUCCESS [  6.037 s]
[INFO] XWiki Commons - Properties ......................... SUCCESS [ 21.143 s]
[INFO] XWiki Commons - Observation - Local ................ SUCCESS [  3.933 s]
[INFO] XWiki Commons - Job ................................ FAILURE [  7.789 s]
[INFO] XWiki Commons - Logging - Logback .................. SKIPPED
[INFO] XWiki Commons - Extension - Parent POM ............. SKIPPED
[INFO] XWiki Commons - Extension - API .................... SKIPPED
[INFO] XWiki Commons - Extension - Maven .................. SKIPPED
[INFO] XWiki Commons - Extension - Handler - Parent POM ... SKIPPED
[INFO] XWiki Commons - Extension - Handler - JAR .......... SKIPPED
[INFO] XWiki Commons - Extension - Repository - Parent POM  SKIPPED
[INFO] XWiki Commons - Extension - Repository - HTTP ...... SKIPPED
[INFO] XWiki Commons - Extension - Repository - Maven ..... SKIPPED
[INFO] XWiki Commons - Repository ......................... SKIPPED
[INFO] XWiki Commons - Repository - Model ................. SKIPPED
[INFO] XWiki Commons - Repository - API ................... SKIPPED
[INFO] XWiki Commons - Extension - Repository - XWiki ..... SKIPPED
[INFO] XWiki Commons - Extension - Repository - Maven - Snapshots Default Repository SKIPPED
[INFO] XWiki Commons - Filter - Parent POM ................ SKIPPED
[INFO] XWiki Commons - Filter - API ....................... SKIPPED
[INFO] XWiki Commons - XML ................................ SKIPPED
[INFO] XWiki Commons - Filter - XML ....................... SKIPPED
[INFO] XWiki Commons - Filter - Test framework ............ SKIPPED
[INFO] XWiki Commons - Filter - Events .................... SKIPPED
[INFO] XWiki Commons - Filter - Event - Extension ......... SKIPPED
[INFO] XWiki Commons - Filter - Streams ................... SKIPPED
[INFO] XWiki Commons - Filter - Stream - Generic XML ...... SKIPPED
[INFO] XWiki Commons - Groovy ............................. SKIPPED
[INFO] XWiki Commons - Management ......................... SKIPPED
[INFO] XWiki Commons - Velocity ........................... SKIPPED
[INFO] XWiki Commons - Diff Script API .................... SKIPPED
[INFO] XWiki Commons - Tools - Extension Plugin ........... SKIPPED
[INFO] XWiki Commons - Tools - XAR Tools .................. SKIPPED
[INFO] XWiki Commons - Tools - XAR Tools - XAR Plugin ..... SKIPPED
[INFO] XWiki Commons - Tools - XAR Tools - XAR Handlers ... SKIPPED
[INFO] XWiki Commons - Tools - WEBJAR XAR Handlers ........ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14:05 min
[INFO] Finished at: 2018-03-27T16:24:12+02:00
[INFO] Final Memory: 160M/1023M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.pitest:pitest-maven:1.2.0:mutationCoverage (pitest-check) on project xwiki-commons-job: Execution pitest-check of goal org.pitest:pitest-maven:1.2.0:mutationCoverage failed: All tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite.
[ERROR] See http://pitest.org for more details.

Any idea?

Successfully applied Descartes to Atos Supersede IF project. Could you please help me to interpret the results?

Issue Type: request for support
Description: Successfully applied Descartes to Atos Supersede IF project. Could you please help me to interpret the results? See HTML report in zip file attached.
Reproducibility: always
Severity: normal
Tool: Descartes PITest, version 25/10/17
Execution Environment: Linux OpenSuse Tumbleweed
Steps to reproduce:
N/A
Files:
atos_supersede_if_descartes_report.zip

Relationships:
Reporter: Yosu Gorroñogoitia [email protected]

Exclude methods that do nothing more than invoking other methods

Methods whose only functionality is to call another method without modifying any parameter are usually pseudo-tested. This type of method might not be of interest for testers, since the invoked method has the real functionality.
This type of method has to be considered as an stop method in the same way as simple getters and setters.

Improve efficiency

Even when Descartes is several times faster than the default PIT engine it would be nice to improve the efficiency of the whole mutation analysis for practical use in regular development cycles.

Failed to execute descartes on xwiki-commons-velocity

Descartes built from master on 2017/11/17, 13:15.

Result of mvn org.pitest:pitest-maven:mutationCoverage -DmutationEngine=descartes:

[INFO] ------------------------------------------------------------------------
[INFO] Building XWiki Commons - Velocity 9.11-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- pitest-maven:1.2.4:mutationCoverage (default-cli) @ xwiki-commons-velocity ---
[INFO] Found plugin : Default csv report plugin
[INFO] Found plugin : Default xml report plugin
[INFO] Found plugin : Default html report plugin
[INFO] Found plugin : Static initializer code detector plugin
[INFO] Found plugin : Static initializer filter plugin
[INFO] Found plugin : Excluded annotations plugin
[INFO] Found plugin : Inlined finally block filter plugin
[INFO] Found plugin : Try with resources filter
[INFO] Found plugin : Implicit null check filter
[INFO] Found plugin : Logging calls filter
[INFO] Found plugin : Infinite for loop filter
[INFO] Found plugin : Long running iterator loop filter
[INFO] Found plugin : Kotlin junk mutations filter
[INFO] Found plugin : Max mutations per class limit
[INFO] Found plugin : Equals shortcut equivalent mutant filter
[INFO] Found shared classpath plugin : Default mutation engine
[INFO] Adding org.pitest:pitest to SUT classpath
[INFO] Mutating from /Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-velocity/target/classes
[INFO] Defaulting target classes to match packages in build directory
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.501 s
[INFO] Finished at: 2017-11-17T13:56:16+01:00
[INFO] Final Memory: 16M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.pitest:pitest-maven:1.2.4:mutationCoverage (default-cli) on project xwiki-commons-velocity: Execution default-cli of goal org.pitest:pitest-maven:1.2.4:mutationCoverage failed: Could not load requested engine descartes
[ERROR] 
[ERROR] Please copy and paste the information and the complete stacktrace below when reporting an issue
[ERROR] VM : Java HotSpot(TM) 64-Bit Server VM
[ERROR] Vendor : Oracle Corporation
[ERROR] Version : 25.131-b11
[ERROR] Uptime : 2492
[ERROR] Input -> 
[ERROR]  1 : -Xmx2048m
[ERROR]  2 : -XX:MaxPermSize=196m
[ERROR]  3 : -Dclassworlds.conf=/Applications/apache-maven-3.5.0/bin/m2.conf
[ERROR]  4 : -Dmaven.home=/Applications/apache-maven-3.5.0
[ERROR]  5 : -Dmaven.multiModuleProjectDirectory=/Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-velocity
[ERROR] BootClassPathSupported : true
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Create a readme

What is Pitest?
What is mutation testing?
What is the goal of this plugin?
What does it add to Pitest?
How to compile and run it?

Switch to Scanner class

The Java version was updated so we can now use the Scanner class and remove the JFlex specification.

Usability enhancement requirement: ability to specify a concrete test suite (or groups of test suites using regular expressions) as target for mutation

Issue Type: required enhancement
Description: I've tried Descartes on Atos Supersede IF project. This project contains 33 Test Suites with a high number of test cases. Few of them are not passed, but Descartes requires a green Suite.
So, passing Descartes on this project is not possible. Only by removing the tests that are not passed.
I suggest to support (as DSpot does) to specify the concrete test suite (or groups of test suites using regular expressions) as the target of Descartes mutation process.
Reproducibility: always
Severity: normal
Tool: Descartes PITest, version 24/10/17
Execution Environment: Linux OpenSuse Tumbleweed
Steps to reproduce:
Clone Atos Supersede IF project from GitHub (descartes branch):
git clone https://github.com/supersede-project/integration.git -b descartes
Go to IF folder:
cd integration/IF/API/eu.supersede.if.api
You can run one selected TestSuite, declared in pom_for_descartes.xml, namely FeedbackRepositoryProxyTest.java, by using Maven:
mvn -f pom_for_descartes.xml test
so only this test is executed by Maven.
However, if I launch Descartes, using the same test execution constraint, all available test suites are executed, but not only the one specified in the pom_for_descartes.xml
mvn -f pom_for_descartes.xml test org.pitest:pitest-maven:mutationCoverage
so Descartes complains that

Execution default-cli of goal org.pitest:pitest-maven:1.2.0:mutationCoverage failed: All tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite.

I would expect that only the test suite specified in the pom file would be executed, as maven test does, or at least that Descartes provides a mechanism to restrict the test suite target.

This is also a way to restrict not only the mutation target within a project but also the computation time.

Files:
Relationships:
Reporter: Yosu Gorroñogoitia [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.