Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to specify which lettuce scenario to run

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 ?

like image 656
zinking Avatar asked Aug 28 '12 07:08

zinking


2 Answers

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

like image 115
Azamat Tokhtaev Avatar answered Oct 14 '22 00:10

Azamat Tokhtaev


in the documentation specified by JohnWang we have documentations like this to achieve:

lettuce xxx.feature -s 1,2,3
like image 29
zinking Avatar answered Oct 13 '22 23:10

zinking