当我运行 Test Runner 文件时,我收到不兼容的类错误:
java.lang.IncompatibleClassChangeError:类 cucumber.runtime.RuntimeOptions 不实现 cucumber.api.junit.Cucumber 的 cucumber.runtime.FeaturePathFeatureSupplier.get(FeaturePathFeatureSupplier.java:23) 请求的接口 io.cucumber.core.options.FeatureOptions .(Cucumber.java:89) 在 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 在 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 在 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)在 java.lang.reflect.Constructor.newInstance(Constructor.java:423) 在 org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104) 在 org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder .java:86) 在 org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) 在 org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) 在 org.junit.runners.model.RunnerBuilder .safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:87 ) 在 org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:46) 在 org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:73) 在 org. eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:522) 在 org.eclipse.jdt.internal.junit.runner。RemoteTestRunner.runTests(RemoteTestRunner.java:760) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:206)