0
我收到此錯誤:黃瓜測試結果CucumberException:無法實例化公共
cucumber.runtime.CucumberException: Failed to instantiate public
cucumber.runtime.java.JavaBackend(cucumber.runtime.io.ResourceLoader)
with [[email protected]] at
cucumber.runtime.Reflections.newInstance(Reflections.java:44) at
cucumber.runtime.Reflections.instantiateSubclasses(Reflections.java:30)
at cucumber.runtime.Runtime.loadBackends(Runtime.java:98) at
cucumber.runtime.Runtime.<init>(Runtime.java:65) at
cucumber.api.junit.Cucumber.createRuntime(Cucumber.java:78) at
cucumber.api.junit.Cucumber.<init>(Cucumber.java:58) at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source) at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source) at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104) at
org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at
org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
下面是我的構建路徑我有罐子:
cucumber core 1.2.4
cucumber java 1.1.3
cucumber junit 1.2.4
cucumber jvm deps 1.0.5
cucumber html 0.2.2
cucumber reporting 2.2.0
gherkin 2.12.2
selenium java 2.53.0
selenium server
standalone > 2.53.1
如果我刪除和運行我得到這個錯誤 java.lang.NoClassDefFoundError:在java.lang.ClassLoader.defineClass1(本機方法) \t小黃瓜/格式化/格式化 \t在需要java.lang.ClassLoader.defineClass (來源不明) \t在java.security.SecureClassLoader.defineClass(來源不明) \t在java.net.URLClassLoader.defineClass(來源不明) \t在java.net.URLClassLoader.access $ 100(來源不明) – Rahim