Hi all:
I happened to meet the following situation .
1. mvn test is passed
2. pitest failed with no green test suite.
logs:
2:43:24 PM PIT >> INFO : Sending 77 test classes to slave
2:43:24 PM PIT >> INFO : Sent tests to slave
2:43:25 PM PIT >> INFO : SLAVE : 2:43:25 PM PIT >> INFO : Checking environment
2:43:28 PM PIT >> INFO : SLAVE : 2:43:28 PM PIT >> INFO : Found 353 tests
2:43:28 PM PIT >> INFO : SLAVE : 2:43:28 PM PIT >> INFO : Dependency analysis reduced number of potential tests by 0
2:43:28 PM PIT >> INFO : SLAVE : 2:43:28 PM PIT >> INFO : 353 tests received
......................
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:29 min
[INFO] Finished at: 2015-08-06T14:44:49+08:00
[INFO] Final Memory: 14M/603M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "with-test-dependency" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.pitest:pitest-maven:1.1.5:mutationCoverage (default-cli) on project app-mdi: Execution default-cli of goal org.pitest:pitest-maven:1.1.5:mutationCoverage failed: All tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite.
[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.
3. pitest passed when I specify the test failed in step 2 using <targetTests>
logs:
2:47:24 PM PIT >> INFO : Verbose logging is disabled. If you encounter an problem please enable it before reporting an issue.
2:47:24 PM PIT >> INFO : Sending 8 test classes to slave
2:47:24 PM PIT >> INFO : Sent tests to slave
2:47:25 PM PIT >> INFO : SLAVE : 2:47:25 PM PIT >> INFO : Checking environment
2:47:26 PM PIT >> INFO : SLAVE : 2:47:26 PM PIT >> INFO : Found 8 tests
2:47:26 PM PIT >> INFO : SLAVE : 2:47:26 PM PIT >> INFO : Dependency analysis reduced number of potential tests by 0
2:47:26 PM PIT >> INFO : 8 tests received
|2:47:30 PM PIT >> INFO : Calculated coverage in 6 seconds.
2:47:34 PM PIT >> INFO : Created 1618 mutation test units
.....
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:14 min
[INFO] Finished at: 2015-08-06T14:48:32+08:00
[INFO] Final Memory: 38M/1751M
[INFO] ------------------------------------------------------------------------
my configuration:
<jvmArgs>
<value>-server</value>
<value>-ea</value>
<value>-XX:PermSize=521m</value>
<value>-XX:MaxPermSize=1g</value>
<value>-Xmx2g</value>
<value>-XX:ReservedCodeCacheSize=512m</value>
<value>-XX:-UseSplitVerifier</value>
</jvmArgs>
mvn org.pitest:pitest-maven:mutationCoverage -Dthreads=32 -DmaxMutationsPerClass=20 -DmutationUnitSize=1 -DtimeoutConstant=50 -DtimeoutFactor=0.5 -DdetectInlinedCode=true -DfailWhenNoMutations=false -DmaxDependencyDistance=1
thanks!