Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIT Help Error : Couldn't exclude classes / test classes - error - tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite. #1320

Open
KBALCHANDRAN opened this issue Mar 29, 2024 · 3 comments

Comments

@KBALCHANDRAN
Copy link

KBALCHANDRAN commented Mar 29, 2024

Issue: Even though I give 'excludedClasses' and 'excludedTestClasses' PIT includes these tests in the run and is not excluding. How it should be changed. These are .java classes. Please help.


Here is my POM.xml:
<pitest-maven-plugin.version>1.4.9</pitest-maven-plugin.version>
<pitest.skip>true</pitest.skip>
<pitest.targetClasses.pattern>com.intuit.*</pitest.targetClasses.pattern>
<pitest.mutation.coverage.threshold>0</pitest.mutation.coverage.threshold>
.
.
.

        <dependency>
            <groupId>org.pitest</groupId>
            <artifactId>pitest-maven</artifactId>
            <version>${pitest-maven-plugin.version}</version>
            <scope>compile</scope>
        </dependency>

.
.
.
image
.
.
.

@hcoles
Copy link
Owner

hcoles commented Mar 29, 2024

If you create a minimal project that reproduces the issue I can take a look.

@KBALCHANDRAN
Copy link
Author

Could you please give me a sample POM.xml file that has the tags to be used for including and excluding files from mutation testing?

@hcoles
Copy link
Owner

hcoles commented Mar 29, 2024

The tags are documented here

https://pitest.org/quickstart/maven/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants