我正在用Cucumber开发Selenium框架,在运行我的第一个特性时出错。
请帮帮忙。
我是怎么启动这个功能的-
立即例外-
Exception in thread "main" cucumber.runtime.CucumberException: No backends were found. Please make sure you have a backend module on your CLASSPATH.
at cucumber.runtime.Runtime.<init>(Runtime.java:78)
at cucumber.runtime.Runtime.<init>(Runtime.java:67)
at cucumber.runtime.Runtime.<init>(Runtime.java:63)
at cucumber.api.cli.Main.run(Main.java:24)
at cucumber.api.cli.Main.main(Main.java:16)我的密码-
Launcher.java -
package cucumber;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(format={"pretty","json:target/"} , features="/src/test/java/cucumber/features")
public class Launcher {
}特征文件-
Feature: it works demo
Scenario: First test
Given this is my step
When this is my second step
Then this is my final step添加到列表中的属地列表-
cucumber-core-1.1.8
cucumber-html-0.2.3
cucumber-java-1.1.8
cucumber-junit-1.1.8
cucumber-jvm-deps-1.0.3
gherkin-2.12.2
hamcrest-all-1.3
junit-4.11
selenium-api-2.42.2
selenium-firefox-driver-2.42.2
selenium-java-2.42.2
selenium-remote-driver-2.42.2
selenium-support-2.42.2我的JVM - 1.7
只有这么多才能在项目中得到。
请帮帮忙。
发布于 2014-09-28 19:41:37
当在类路径上没有找到“后端”时,将引发此错误。每种受支持的语言都有一个“后端”(例如黄瓜-java、黄瓜-groovy等)。
这可能是一个类路径错误,尽管黄瓜-核心和黄瓜-java位于相同的位置,这看起来确实很奇怪。
https://stackoverflow.com/questions/25923405
复制相似问题