【问题标题】:Cucumber not working in Intellij Idea: Seems like IDE is not reading plug-insCucumber 在 Intellij Idea 中不起作用:似乎 IDE 没有读取插件
【发布时间】:2020-04-02 06:11:53
【问题描述】:

功能:验证登录屏幕的功能 场景:输入正确的凭据后,用户将能够登录帐户

    Given User is on Log In Page
    When User enters Mail ID & Password
    Then User gets the confirmation, "Welcome Back"

没有片段在工作,按 ctrl+空格键没有创建 stepDefs 文件。 并且颜色代码也不符合 IDE 颜色主题

【问题讨论】:

  • 你最近有更新吗? IntelliJ / 黄瓜?也许 Intellij Cucumber 插件不是最新的。

标签: java selenium intellij-idea ide cucumber


【解决方案1】:

请检查您的功能文件是否应按照以下格式对齐

Feature: Login scenario

   Scenario: User will be able to Log In to the account after entering the correct credentials
    Given User is on Log In Page
    When User enters Mail ID & Password
    Then User gets the confirmation, "Welcome Back"

还要检查对 Gherkin 语言的支持,Cucumber 测试工具使用该语言与 cucumber java 插件安装一起支持用 Java 编写的步骤定义。

Please check :
1. java properly installed on your machine. 
2. Test Runner class is pointing to glue code package

【讨论】:

  • 1.好吧,如果我们使用 intellij,那么 Intellij 遵循相同的格式,但我的 IDE 仍然不是,因此我使用了相同的格式 2. Java 安装完美 3. Test Runner 类我也指向胶水代码包
  • 能否请您正确安装 cucumber for java 和 gherkin 插件
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-11-26
  • 2013-10-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-10-20
  • 1970-01-01
相关资源
最近更新 更多