如何指定要运行的生菜场景?
在使用python lettuce测试框架时,我经常遇到这种情况,有一个场景失败了,然后我想放大这个场景来修复这个场景。
我们可以指定在功能文件中运行哪个lettuce场景吗?
发布于 2012-11-12 14:24:05
在JohnWang指定的documentation中,我们有这样的文档来实现:
lettuce xxx.feature -s 1,2,3发布于 2013-05-28 13:50:48
您可以使用标签进行所需的测试。例如:
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然后,当您运行lettuce时,只需使用
./manage.py收割-t wip
它将只运行那些标记为@wip的场景,在我的例子中,wip用于正在进行的工作
如果没有django而只有lettuce,那么使用
lettuce -t wip
https://stackoverflow.com/questions/12154822
复制相似问题