【发布时间】:2020-06-18 16:21:19
【问题描述】:
这是我的 testRunner 类: 尚未完成。
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(features= "src/test/resources/features/dhlcj",
glue="dhl.gaqcjqa.fsApi.steps")
public class TestRunnerFsApi {
}
和我的依赖: 我不确定版本是否可以匹配。
<dependencies>
<!-- Junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- Cucumber Junit -->
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
</dependency>
<!-- Cucumber VM -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>4.1.1</version>
</dependency>
<!-- Gherkin -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>gherkin</artifactId>
<version>4.1.1</version>
</dependency>
<!-- Rest Assured -->
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>4.0.0</version>
</dependency>
<!-- Rest Assured Json Path -->
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>json-path</artifactId>
<version>4.0.0</version>
</dependency>
<!-- Rest Assured Schema Validator -->
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>json-schema-validator</artifactId>
<version>4.0.0</version>
</dependency>
<!-- Rest Assured Common -->
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured-common</artifactId>
<version>4.3.0</version>
</dependency>
您能解释一下为什么会出现此错误吗? 我正在使用 Maven,但当时我通过右键单击页面并运行来排除测试运行器类中的代码!
【问题讨论】: