gpt4 book ai didi

java - Cucumber Scenario Outline 只运行了一次,即使它有 3 个场景

转载 作者:行者123 更新时间:2023-12-02 08:50:34 26 4
gpt4 key购买 nike

  • .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 |

最佳答案

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

运行您的功能文件后,我可以看到它工作绝对正常,没有任何问题。请引用下面的屏幕截图供您引用。尝试重新启动你的intellij并再次运行它

enter image description here

关于java - Cucumber Scenario Outline 只运行了一次,即使它有 3 个场景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60801917/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com