如何使用这种文件结构运行行为测试:
+-- 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我希望能够在其适当的页面组织功能和步骤。目前,我可以一次运行一个test 1文件夹,其中的步骤没有任何子文件夹。
示例:
behave /features/user_page/customer_search.feature发布于 2017-01-11 07:54:10
根据Behave的文档,似乎你必须将你的步骤定义直接放在steps文件夹中,除非你想接触一些源代码。
为了organize features and steps,我建议你使用标签。或者,如果您想通过organize features and steps来格式化,可以尝试使用Junit或JSON格式化程序。
https://stackoverflow.com/questions/41578133
复制相似问题