【发布时间】:2020-12-20 20:09:39
【问题描述】:
有没有办法通过单个 behave 调用从多个文件夹运行测试。
下面是详细的问题。我有两个名为 sample1 和 sample2 的功能文件夹。我想通过单个行为调用在每个文件夹中运行测试。我在配置文件中看到了[paths option](https://behave.readthedocs.io/en/latest/behave.html?highlight=paths#configuration-files),但没有太多可用的文档。是否可以加载特定于每个目录的多个步骤文件?
└── testsuites
├── sample1
│ ├── cpcode.feature
│ └── steps
│ └── cpcode.py
└── sample2
├── cpcode.feature
└── steps
└── cpcode.py
我已将behave.ini 配置为paths=./testsuites/sample1 ./testsuites/sample2。但是测试结果表明,即使对于sample2文件夹中的Scenario,也选择了sample1中的步骤。
【问题讨论】:
-
你打算如何运行它?从命令行,从任何 IDE 或其他东西?
-
我希望从 Jenkins 实例/shell 执行此操作。
标签: python python-behave