2016-11-18 43 views
0

我爲python使用lettuce BDD框架。 在示例中,所有場景都只使用一個* .py文件中的方法 - steps.py 如何設置* .feature和它的* .py文件之間的關係?如何建立萵苣的特徵和步驟之間的關係?

我需要這些功能的文件:

auth.feature 
pay.feature 

這些PY文件

auth.py 
pay.py 

我需要這樣的:從auth.feature情景參考方法只在auth.py 和場景從薪酬。功能僅參考pay.py中的方法

回答

0

將此放在步驟文件的頂部:

from lettuce import * 
from lettuce import steps 

然後,對於每個步驟,寫:

@step('I make it go') 
def i_make_it_go(step): 
相關問題