How to specify which lettuce script is running

how to indicate which lettuce script is running?

in using python lettuce test environment I often met in this case, one script failed and then I want to zoom in on this script to fix this script

Can I indicate which lettuce script is running in the function file?

+6
source share
2 answers

in the documentation specified by JohnWang, we have such documents in order to achieve:

lettuce xxx.feature -s 1,2,3 
+4
source

You can use tags for your desired tests. For instance:

  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 start the salad, use

./manage.py crop -t wip

It will run only those scripts that are tagged with @wip , in my case wip is for current work

If it's not django and just a salad, use

lettuce -t wip

+12
source

Source: https://habr.com/ru/post/923941/


All Articles