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

Fails to discover the used test engine. #30

Open
jcornaz opened this issue Jul 26, 2019 · 0 comments
Open

Fails to discover the used test engine. #30

jcornaz opened this issue Jul 26, 2019 · 0 comments

Comments

@jcornaz
Copy link

jcornaz commented Jul 26, 2019

Junit5 is a platform used by many different test engines.

For example, I'm using Spek which as for engine id: "spek2".

But pitest (using pitest-junit5-plugin) only triggers test discovery of the junit-jupiter engine.

As a result, I see the following exception:

WARNING: TestEngine with ID 'junit-jupiter' failed to discover tests
java.lang.NoClassDefFoundError: org/junit/jupiter/api/extension/ExtensionContext
        at org.junit.
2:45:14 PM PIT >> INFO : MINION : jupiter.engine.JupiterTestEngine.discover(JupiterTestEngine.java:66)
        at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:168)
        at org.junit.platform.launcher.core.DefaultLauncher.discoverRoot(DefaultLauncher.java:
2:45:14 PM PIT >> INFO : MINION : 155)
        at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:120)
        at org.pitest.junit5.JUnit5TestUnitFinder.findTestUnits(JUnit5TestUnitFinder.java:49)
        at org.pitest.testapi.execute.FindTestUnits.findTestUnits(FindTestUnits.
2:45:14 PM PIT >> INFO : MINION : java:57)
        at org.pitest.testapi.execute.FindTestUnits.getTestUnits(FindTestUnits.java:40)
        at org.pitest.testapi.execute.FindTestUnits.findTestUnitsForAllSuppliedClasses(FindTestUnits.java:29)
        at org.pitest.coverage.execute.CoverageMinion.discoverTests
2:45:14 PM PIT >> INFO : MINION : (CoverageMinion.java:157)
        at org.pitest.coverage.execute.CoverageMinion.getTestsFromParent(CoverageMinion.java:138)
        at org.pitest.coverage.execute.CoverageMinion.main(CoverageMinion.java:84)
Caused by: java.lang.ClassNotFoundException: org.junit.jupit
2:45:14 PM PIT >> INFO : MINION : er.api.extension.ExtensionContext
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
        at java.lang.ClassLoader.loadC
2:45:14 PM PIT >> INFO : MINION : lass(ClassLoader.java:357)
        ... 11 more

And no coverage is found.

(This is related to hcoles/pitest#455)

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

1 participant