【发布时间】:2020-12-29 20:12:10
【问题描述】:
这是我的功能文件
Scenario Outline: Test different value for same parameter
Examples:
| app | app1 |
| instagram| facebook |
Given <app> is installed on my device
And <app1> is installed on my device
@given("<app> is installed on my device")
def app_installation(app):
install_app(app)
到目前为止,我不能在同一步骤中使用 app2 值,我必须使用 app1 参数复制 app_installation
有没有办法可以使用示例中的任何参数,其值可以映射到app
【问题讨论】:
-
按照您的示例,您是否希望在继续下一步之前安装 1 个场景,其中 instagram 和 facebook(以及 whatsapp 和等)都已安装?
-
是的,我想测试一些需要同时安装的东西
标签: python python-3.x bdd feature-file pytest-bdd