【发布时间】:2020-06-24 00:32:03
【问题描述】:
从那里我可以获得 Java 的最新 Test Runner 类格式和黄瓜依赖项。我有旧的依赖项,它正在工作,但现在这些太旧了,没有。我创建了新的 POM 文件,但现在我的 TestRunner 文件有红色错误行,我无法运行我的测试。我在下面复制了我的新旧依赖项。请让我知道我在这里缺少什么。我需要更多的依赖还是这些就足够了。
旧 POM:(使用旧依赖项,当我尝试运行功能文件时出现以下错误:
cucumber.runtime.CucumberException:未知选项:--plugin
<dependencies>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>1.1.8</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.1.8</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.42.2</version>
</dependency>
</dependencies>
NEW POM: (if I use following new dependencies, my TESTRUNNER has red lines under"@CucumberOptions"
<!-- https://mvnrepository.com/artifact/info.cukes/cucumber-picocontainer -->
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>1.2.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/info.cukes/cucumber-junit -->
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-server -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>3.141.59</version>
</dependency>
【问题讨论】:
-
您是否(自动)导入了新的依赖项?