【问题标题】:Cucumber .feature not working in intellijCucumber .feature 在 intellij 中不起作用
【发布时间】:2019-10-23 13:20:36
【问题描述】:

我正在尝试开始使用 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”插件?

标签: java intellij-idea automation cucumber


【解决方案1】:

您使用的是最新版本的 Cucumber(thnx!),有时 IDE 插件需要一段时间才能赶上: 1.尝试升级你的IDE和插件。 2. 在 YouTrack 中搜索与 Cucumber 插件相关的已知问题(请为它们投票!),如果不存在,请创建一个。 3. 降级到与您的 IDE 配合使用的稍旧版本的 Cucumber。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-07-05
    • 1970-01-01
    • 2018-05-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-07
    相关资源
    最近更新 更多