Java JVM:在一个步骤定义上运行多个测试用例

Java JVM:在一个步骤定义上运行多个测试用例,java,selenium,testing,cucumber-jvm,Java,Selenium,Testing,Cucumber Jvm,我在JVMCumber中有一个场景,如下所示 Given I have launched the <app_name> application page And I fill out the <first_name> and <last_name> on the page And I click Submit And I am shown <message> on the <app_name> page based on <dec

我在JVMCumber中有一个场景,如下所示

Given I have launched the <app_name> application page
And I fill out the <first_name> and <last_name> on the page
And I click Submit
And I am shown <message> on the <app_name> page based on <decision>
When I fill in username with value <username>
And I fill in password with value <password>
And I fill in confirmPassword with value <confirmPassword>
Then I should see the enroll button enabled for submission
假设我已经启动了应用程序页面
我在页面上填写了和
我点击提交
我在页面上的显示基于
当我用值填充username时
我用值填充密码
我用值填写confirmPassword
然后,我会看到注册按钮启用提交

在上述情况下,我只想提交一次申请,因为这相当耗时。一旦我仅提交,我就可以获得注册页面,因为它受会话令牌限制。但在那之后,我想用不同的用户名、密码和confirmpassword集运行多个测试。在我们跨越特定提交步骤定义之后,是否可能有多个测试运行。类似于测试运行的循环。

使用示例运行具有多个测试值的相同功能

Feature: Some test feature

    Background:
    Given I have launched the <app_name> application page
    And I fill out the <first_name> and <last_name> on the page
    And I click Submit
    And I am shown <message> on the <app_name> page based on <decision>


    Scenario Outline:
    When I fill in username with value "<username>"
    And I fill in password with value "<password>"
    And I fill in confirmPassword with value "<confirmPassword>"
    Then I should see the enroll button enabled for submission

    Examples:
    |username|password|confirmPassword|
    |usernam1|password1|password1|
    |usernam2|password2|password2|
    |usernam3|password3|password3|
功能:一些测试功能
背景:

鉴于我已经启动了

使用示例运行具有多个测试值的相同功能

Feature: Some test feature

    Background:
    Given I have launched the <app_name> application page
    And I fill out the <first_name> and <last_name> on the page
    And I click Submit
    And I am shown <message> on the <app_name> page based on <decision>


    Scenario Outline:
    When I fill in username with value "<username>"
    And I fill in password with value "<password>"
    And I fill in confirmPassword with value "<confirmPassword>"
    Then I should see the enroll button enabled for submission

    Examples:
    |username|password|confirmPassword|
    |usernam1|password1|password1|
    |usernam2|password2|password2|
    |usernam3|password3|password3|
功能:一些测试功能
背景:
鉴于我已经启动了