Cucumber 框架无法识别 @Given/When/Then 注释,但执行工作正常。警告标志将始终显示在功能文件上,并显示“步骤没有匹配的胶水代码”消息。下面是我的 pom.xml 依赖项。
<dependencies>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>6.10.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-testng</artifactId>
<version>6.10.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>tech.grasshopper</groupId>
<artifactId>extentreports-cucumber6-adapter</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>5.0.4</version>
<scope>compile</scope>
</dependency>
如果我从io.cucumber更改为info.cukes,则警告标志将消失。请帮助我了解如何解决此错误