how to specify which lettuce scenario to run?
in using python lettuce test framework, I ran frequently into this case, one scenario failed and then I want to zoom in to this scenario to fix this scenario
can we specify which lettuce scenario to run in the feature file ?
You can use tags for the desired tests. For example:
Scenario: Set off time in free time slot
Given I click first free time slot
And I choose menu item "Off"
And I enter time that is in free interval
When I click button "Ok"
Then I see offtime time slot with title that matches with saved interval
@wip
Scenario: Set free time on off time
Given I click last off time slot
And I choose menu item "Set working"
And I enter time that is in last off interval
When I click button "Ok"
Then I see freetime time slot with title that matches with saved interval
Then when you run lettuce just use
./manage.py harvest -t wip
It will run only those scenarios that are marked with tag @wip, in my case wip is for Work in Progress
If it is without django and just lettuce then use
lettuce -t wip
in the documentation specified by JohnWang we have documentations like this to achieve:
lettuce xxx.feature -s 1,2,3
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