【问题标题】:Cucumber Scenario Outline only ran once, even it have 3 scenariosCucumber Scenario Outline 只跑了一次,竟然有 3 个场景
【发布时间】:2020-07-03 05:29:45
【问题描述】:
  • .feature 文件:
Feature: Test Log In Functionality

  Scenario: The user should be able to login with correct userName & Password
    Given user is on Login Page
    When user enters the correct UserName & Password
    Then user gets the Confirmation

  Scenario Outline: User should Log In with below credentials
    Given user is on Login Page
    When user enters the correct Email <UserName>
    And user enters the correct Password <Password>
    And user enters the Log In Button
    Then user gets the Confirmation

    Examples: 
      | UserName             | Password  |
      | shoryak3@outlook.com | Test@1234 |
      | tim@Testmail.com     | trpass    |
      | Rich@TestMail.com    | rwpass    |

【问题讨论】:

    标签: java selenium cucumber gherkin


    【解决方案1】:

    我已经快速检查了您的功能文件。我希望- .feature file: 行不是您的功能文件的一部分。如果是,那么您将获得cucumber.runtime.CucumberException: gherkin.ParserException$CompositeParserException: Parser errors:

    运行您的功能文件后,我可以看到它的工作非常好,没有任何问题。请参考下面的截图供您参考。尝试重新启动您的 intellij 并再运行一次

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-21
      • 2021-10-17
      • 2016-12-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多