Execute only specific examples in a Scenario Outline

前端 未结 2 650
面向向阳花
面向向阳花 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        |
    
    0 讨论(0)
  • 2021-01-14 04:51

    That is not what scenario outlines are designed for. You can write separate scenario's and then use tags on each one that you can then pass in at runtime which tag you want to run.

    0 讨论(0)
提交回复
热议问题