Python行为,在多个子目录中运行特性
如何使用这种文件结构运行behave测试:Python行为,在多个子目录中运行特性,python,bdd,python-behave,Python,Bdd,Python Behave,如何使用这种文件结构运行behave测试: +-- features/ +-- user_page/ | +-- user_crud.feature | +-- user_search.feature +-- customer_page/ | +-- customer_crud.feature | +-- customer_search.feature +-- steps/ +-- us
+-- features/
+-- user_page/
| +-- user_crud.feature
| +-- user_search.feature
+-- customer_page/
| +-- customer_crud.feature
| +-- customer_search.feature
+-- steps/
+-- user_page/
| +-- user_crud.py
| +-- user_search.py
+-- customer_page/
| +-- customer_crud.py
| +-- customer_search.py
我希望能够在适当的页面中组织功能和步骤。目前,我可以一次运行一个test1文件夹,其中的步骤没有任何子文件夹
例如:
behave /features/user_page/customer_search.feature
根据Behave的文档,除非您想接触一些源代码,否则您似乎必须将步骤定义直接放在步骤文件夹中
为了组织功能和步骤,我建议您使用标签。或者,如果您想通过组织功能和步骤来获得更好的结果,您可以尝试Junit或JSON格式化程序,根据Behave的文档,似乎您必须直接将步骤定义放在步骤文件夹中,除非您想接触一些源代码
为了组织功能和步骤,我建议您使用标签。或者,如果您的意思是希望通过组织功能和步骤来
获得更好的结果
,您可以尝试Junit或JSON格式化程序向我们展示您所尝试的内容演示您所尝试的内容