Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Unable to use Tycho + Junit5 + MockitoExtension


I'm trying to use Tycho with Junit5 and Mockito using @ExtendWith and MockitoExtension

However Mockito requires a jupiter-engine version 5.4.0+ but Tycho seems to embed a version an older version. So when I run my test it fails with
java.lang.AbstractMethodError: Method org/junit/jupiter/engine/descriptor/MethodExtensionContext.getTestInstances()Ljava/util/Optional; is abstract

I tried using a newer engine by adding junit-jupiter-engine to the Require-bundle but then the execution fails with:
Caused by: java.util.ServiceConfigurationError: org.junit.platform.engine.TestEngine: Provider org.junit.jupiter.engine.JupiterTestEngine not a subtype

Is there a way to specify a more recent engine to use?

In case it helps I have a small repro test available here

Back to the top