我正在尝试开始使用 cucumber ,但我似乎无法弄清楚为什么 *.feature 文件未被识别。
这就是我到目前为止所做的:
Pom 文件:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>groupId</groupId>
<artifactId>untitled1</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-junit -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>4.8.0</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.jayway.restassured/rest-assured -->
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>rest-assured</artifactId>
<version>2.9.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
然后我在test\java下制作了一个名为features的包,在这个包中当我制作*.feature文件时,它会出现一个“?”在它旁边,它打不开,这应该是一个 cucumber 文件,对吗?
我已经编译了整个内容,它没有错误
最佳答案
您正在使用最新版本的 Cucumber(谢谢!),有时 IDE 插件需要一段时间才能跟上: 1. 尝试升级您的IDE和插件。 2. 在 YouTrack 中搜索与 Cucumber 插件相关的已知问题(请投票!),如果尚不存在,则创建一个。 3. 降级到与您的 IDE 兼容的稍旧版本的 Cucumber。
关于java - Cucumber .feature 在 intellij 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58523852/