i have the below scenario in BDD frame work.
Scenario Outline: Addition of many numbers
Given I have '<num1>' and '<num2>'
When I add them
Then The result must be '<total>'
Examples:
| num1 | num2 | total |
| 1 | 1 | 2 |
| 11 | 31 | 42 |
| 21 | 41 | 62 |
| 31 | 51 | 82 |
i can run this using --name Addition of many numbers which will execute all the 4 examples. but i want to execute only the 2nd example | 11 | 31 | 42 |
How can i do this?
i tried --name Addition of many numbers [email protected] which doesnt work
You can do it by specifying the line number after the .feature filename:
behave your_feature.feature:line_number
From 'behave --help':
So if you have a feature like the following, you should run behave your_feature.feature:11 to run the 2nd example only (note that the line numbers start with 1)