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

crash with "tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite" #53

Open
monperrus opened this issue Oct 27, 2020 · 7 comments

Comments

@monperrus
Copy link
Member

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
Copy link
Member

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
Copy link
Member Author

Is it a multimodule project?

No

Doing "mvn install" first does not fix the error.

@oscarlvp
Copy link
Member

oscarlvp commented Oct 28, 2020

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
Copy link
Member Author

git clone https://github.com/INRIA/spoon/ 😄

@monperrus
Copy link
Member Author

@oscarlvp WDYT of this error? Thanks!

@monperrus
Copy link
Member Author

Hi @oscarlvp Tried again, I confirm that the error on Spoon is still there with the new release.

@oscarlvp
Copy link
Member

Hi @oscarlvp Tried again, I confirm that the error on Spoon is still there with the new release.

PitMP is not using the latest version, so no change was expected on this.
Have you tried Descartes alone?

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