Execute only specific examples in a Scenario Outline

前端 未结 2 649
面向向阳花
面向向阳花 2021-01-14 04:06

We\'re looking to better manage test data using Cucumber in our Java test automation framework. For a Scenario Outline, we\'re looking to tabulate test paramete

2条回答
  •  礼貌的吻别
    2021-01-14 04:44

    You can get this done by splitting up your examples table into two and using tags on them... Then run the test with the tags to filter in cucumberoptions.

    @others
    Examples:
    |user    |pass     |environment|
    |test    |test1    |local      |
    |prodtest|prodtest1|production |
    
    @sit
    Examples:
    |user    |pass     |environment|
    |retest  |retest1  |sit        |
    

提交回复
热议问题