ant test succeeded, but still got" All tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite."

833 views
Skip to first unread message

zhangji...@gmail.com

unread,
Oct 24, 2014, 4:43:58 AM10/24/14
to pitu...@googlegroups.com
I've met several projects, with whom the ant test task succeeded, but when I ran "ant pit", I got the following errors (for Jmeter 2.9.1):
[pitest] Exception in thread "main" org.pitest.help.PitHelpError: All tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite.
   [pitest] See http://pitest.org for more details.
   [pitest]     at org.pitest.coverage.execute.DefaultCoverageGenerator.verifyBuildSuitableForMutationTesting(DefaultCoverageGenerator.java:106)
   [pitest]     at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:91)
   [pitest]     at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:48)
   [pitest]     at org.pitest.mutationtest.tooling.MutationCoverage.runReport(MutationCoverage.java:118)
   [pitest]     at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:101)
   [pitest]     at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:43)
   [pitest]     at org.pitest.mutationtest.commandline.MutationCoverageReport.runReport(MutationCoverageReport.java:71)
   [pitest]     at org.pitest.mutationtest.commandline.MutationCoverageReport.main(MutationCoverageReport.java:43)

BUILD FAILED
/home/seitest/JieZhang/mutation testing/projects/jdepend-2.9.1/build.xml:268: /home/seitest/JieZhang/mutation testing/projects/jdepend-2.9.1/build.xml:268: Java returned: 1

Total time: 4 seconds
seitest@seitest:~/JieZhang/mutation testing/projects/jdepend-2.9.1$  All tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite.
All: command not found


My build.xml is as attached. Please help me check if I've made any mistakes in the configuration? Many thanks!
build.xml

Henry Coles

unread,
Oct 24, 2014, 5:05:34 AM10/24/14
to pitu...@googlegroups.com
On 24 October 2014 09:43, <zhangji...@gmail.com> wrote:

I've met several projects, with whom the ant test task succeeded, but when I ran "ant pit", I got the following errors (for Jmeter 2.9.1):
[pitest] Exception in thread "main" org.pitest.help.PitHelpError: All tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite.

Looking at the build file that you posted I can see the following differences between the normal test and pitest tasks

1. The test task is running just the jdepend.framework.AllTests suite. The pitest task is scanning for all tests and may be picking up things not included in the suite
2. The test task sets a system property "jdepend.home" that is not set when running from pitest - do the tests depend on this?

If you check the log output pit reports on which tests are failing which should help debug the problem.

Henry
Reply all
Reply to author
Forward
0 new messages