【发布时间】:2015-07-08 07:10:28
【问题描述】:
我同时使用 Cucumber-JVM 和 Selenium WebDriver。我在eclipse中有一个Maven项目,pom.xml文件的依赖如下:
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.2</version>
<scope>test</scope>
</dependency>
RunCukesTest.java 文件内容为:
import org.junit.runner.RunWith;
import cucumber.junit.Cucumber;
@RunWith(Cucumber.class)
@Cucumber.Options(format = {"pretty", "html:target/cucumber-htmlreport","json-pretty:target/cucumber-report.json"})
public class RunCukesTest {
}
我在以下代码行中收到错误:
import cucumber.junit.Cucumber;
@RunWith(Cucumber.class)
@Cucumber.Options(format = {"pretty", "html:target/cucumber-htmlreport","json-pretty:target/cucumber-report.json"})
但是当我使用 1.0.14 版本时,它运行良好。最新版本有什么问题?
【问题讨论】:
-
你有什么错误信息?
-
导入 cucumber.junit 无法解析为“import cucumber.junit.Cucumber;”和此行的多个标记 - Cucumber 无法解析为类型 - Class
无法解析接下来的 2 行代码
标签: eclipse selenium-webdriver cucumber cucumber-jvm cucumber-junit