crash with "tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite"
monperrus opened this issue · 7 comments
monperrus commented
I'm trying to use pitmp on Spoon as follows:
mvn eu.stamp-project:pitmp-maven-plugin:descartes
This crashed with
[ERROR] Failed to execute goal eu.stamp-project:pitmp-maven-plugin:1.3.7:descartes (default-cli) on project spoon-core: Execution default-cli of goal eu.stamp-project:pitmp-maven-plugin:1.3.7:descartes failed: 1301 tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite.
Which is triggered by a lower-level error:
12:50:08 PM PIT >> INFO : MINION : 12:50:08 PM PIT >> SEVERE : Description [testClass=spoon.CompilationUnitPrintTest, name=test(spoon.CompilationUnitPrintTest)]
java.lang.NoClassDefFoundError: Could not initialize class spoon.reflect.factory.ModuleFactory$CtUnnamedModule
at spoon.reflect.CtModelImpl.<init>(CtModelImpl.java:84)
at spoon.reflect.factory.FactoryImpl.<init>(FactoryImpl.java:442)
at spoon.Launcher.createFactory(Launcher.java:651)
at spoon.Launcher.<init>(Launcher.java:148)
at spoon.CompilationUnitPrintTest.test(CompilationUnitPrintTest.java:30)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.pitest.junit.adapter.CustomRunnerExecutor.run(CustomRunnerExecutor.java:42)
at org.pitest.junit.adapter.AdaptedJUnitTestUnit.execute(AdaptedJUnitTestUnit.java:69)
at org.pitest.coverage.execute.CoverageDecorator.execute(CoverageDecorator.java:50)
at org.pitest.testapi.execute.containers.UnContainer.execute(UnContainer.java:31)
at org.pitest.testapi.execute.Pitest.executeTests(Pitest.java:57)
at org.pitest.testapi.execute.Pitest.run(Pitest.java:48)
at org.pitest.coverage.execute.CoverageWorker.run(CoverageWorker.java:51)
at org.pitest.coverage.execute.CoverageMinion.main(CoverageMinion.java:90)
Any idea?
oscarlvp commented
Is it a multimodule project?
If that is the case, then be sure that you do mvn install
before running PitMP
and that you run PItMP in the root, not one of the modules.
monperrus commented
Is it a multimodule project?
No
Doing "mvn install" first does not fix the error.
oscarlvp commented
Doing "mvn install" first does not fix the error.
This was only in the case of multimodule projects.
Can you share the link to the repository?
monperrus commented
git clone https://github.com/INRIA/spoon/
😄