I have a 'behave' feature that has a lot of tests on it.
I only need to run a specific scenario for development needs.
How do I do it?
(preferably on the command line)
You can run a feature file by using -i or --include flags and then the name of the feature file. For more information check the documentation for command line arguments. There's a lot of useful information hidden in their appendix section. NOTE: At the time I'm writing this it won't work with Python 3.6 and Behave 1.2.
Advertisements. A Scenario Outline is used if we have a group of similar criteria and the results are to be passed in a Scenario. A Scenario Outline is accompanied with an Examples table. A Scenario Outline can have multiple Examples tables.
To run only a single scenario you can use -n
with the name of the scenario:
$ behave -n 'clicking the button "foo" should bar the baz'
I'm using single quotes above to keep the name of the scenario as one argument for -n
. Otherwise, the shell will pass each word of the scenario name as a separate argument.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With