Skip to content Skip to sidebar Skip to footer

Use Behave Tags To Execute Only A Subcase Of Such Tag

I have the following scenario definition in a sample.feature file, with scenario with two sub-cases using the Examples syntax: @ninja Scenario Outline: this is a sample scenari

Solution 1:

Yes, it is possible to execute only one row in a Scenario Outline (Examples), first is necessary to define a placeholder in the tag into the feature file, example: @test.row<row.id>Reference in Behave

After, to execute:

behave example.feature -t @test.row1.2-- run only the row: 2 with this tag.

Also it is posible create several examples, like this:

Examples:|param1|param2|param3|
      |     10 |      4 |      9 | 
      |     20 |      8 |     23 |
Examples:|param1|param2|param3|
      |     30 |     12 |      1 | 
      |     40 |     13 |     45 |
      |     50 |     14 |     49 | 
      |     60 |     15 |     13 |

And,

behave example.feature -t @test.row2.4-- run only the row: 4 in the second examples with this tag:

      |     60 |     15 |     13 |

Post a Comment for "Use Behave Tags To Execute Only A Subcase Of Such Tag"