首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Python-Behave,在多个子目录中运行功能

Python-Behave,在多个子目录中运行功能
EN

Stack Overflow用户
提问于 2017-01-11 04:49:17
回答 1查看 577关注 0票数 1

如何使用这种文件结构运行行为测试:

代码语言:javascript
复制
+-- 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文件夹,其中的步骤没有任何子文件夹。

示例:

代码语言:javascript
复制
behave /features/user_page/customer_search.feature
EN

回答 1

Stack Overflow用户

发布于 2017-01-11 07:54:10

根据Behave的文档,似乎你必须将你的步骤定义直接放在steps文件夹中,除非你想接触一些源代码。

为了organize features and steps,我建议你使用标签。或者,如果您想通过organize features and steps来格式化,可以尝试使用Junit或JSON格式化程序。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41578133

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档