question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Don't fail if there are no tests to mutate

See original GitHub issue

I added a new module in my maven project which only contains resources, and our “QA” build that runs pitest failed:

[INFO] --- pitest-maven:1.1.4:mutationCoverage (default-cli) @ persistency-model ---
[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 shared classpath plugin : Default mutation engine
52:35 AM PIT >> INFO : Mutating from /home/bamboo/bamboo-agent-home/xml-data/build-dir/COL-QA-JOB1/persistency-model/target/classes
6:52:35 AM PIT >> INFO : Verbose logging is disabled. If you encounter an problem please enable it before reporting an issue.
6:52:36 AM PIT >> INFO : Sending 0 test classes to slave
6:52:36 AM PIT >> INFO : Sent tests to slave
6:52:36 AM PIT >> INFO : Calculated coverage in 0 seconds.
6:52:36 AM PIT >> INFO : Created  0 mutation test units
[...]
[ERROR] Failed to execute goal org.pitest:pitest-maven:1.1.4:mutationCoverage (default-cli) on project persistency-model: Execution default-cli of goal org.pitest:pitest-maven:1.1.4:mutationCoverage failed: No mutations found. This probably means there is an issue with either the supplied classpath or filters.

This module doesn’t have any java source files.

It would be really nice if the mutationCoverage goal would simply skip this project, just like the maven compiler/surefire/etc plugins do.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
fgecommented, Mar 26, 2015

@ankon has a point though; if there are no Java source files to begin with, it sounds logical that mutations should not be attempted 😉

2reactions
maxgabutcommented, Feb 1, 2019

Definitely fixed, by this commit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Don't fail task if Junit Test Results are not found
Is there a way to allow JunitTest Results Task to not fail if no test results are found?
Read more >
PI test failing when no tests are found in the project
I am using pi test in parent pom, I am having the below issue when there are no ... org.pitest:pitest-maven:1.0.0:mutationCoverage failed: No test...
Read more >
All test cases passed in junit but PIT is failing - Stack Overflow
When I inject a fault into my test suite and run Pitest, then it clearly shows me which tests fail. Even without enabling...
Read more >
Mutation Testing - Who will test the tests themselves?
In this post I will be looking at mutation testing. This is aimed at people who are not familiar with mutation testing.
Read more >
Mutation Testing: Too Good to Be True? - Nexocode
However, they can also give a false sense of confidence if they don't fail when errors are introduced. Code coverage reports can show...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found