STAMP-project / pitmp-maven-plugin

Maven plugin to handle multi module projects for PiTest
GNU Lesser General Public License v3.0
46 stars 14 forks source link

Run mutation on a filtered class and test #39

Closed giograno closed 5 years ago

giograno commented 6 years ago

Characteristics

Issue Type: help wanted

Description

I have the following usage scenario, but I am struggling to obtain the desired results. I want to run the mutation for a single class and over a single test case. Thus, I added this part to my pom file:

<plugin>
    <groupId>eu.stamp</groupId>
    <artifactId>pitmp-maven-plugin</artifactId>
    <version>1.3.2</version>
    <configuration>
        <failWhenNoMutations>false</failWhenNoMutations>
        <targetClasses>
            <param>
            com.module.MyClassTest
            </param>
        </targetClasses>
        <targetTests>
            <param>
            com.module.MyClassTest
            </param>
        </targetTests>
    </configuration>
</plugin>

and I run the following command mvn eu.stamp-project:pitmp-maven-plugin:run.

With this configuration, I would expect to mutation only the com.module.MyClass and run the com.module.MyClassTest over the mutants, while instead it seems that the entire project is analyzed.

oscarlvp commented 5 years ago

What might be happening is that your configuration has the wrong groupId value. It should be eu.stamp-project. It seems that, since it is not the same groupId the pom.xml configuration is not used.