【发布时间】:2019-04-25 02:32:32
【问题描述】:
我有以下图片作为测试用例
]1
使用behaviour的时候,我们写的是这样的场景
Given When user is logged in to the platform
When user opens the settings window
Then user should see the following values
| Field | Value |
| Currency | Reported currency |
| Conversion Method | MI recommended |
| Magnitude | Millions (6) |
| Display Null Value As | SOA_Null |
| Function Options | Excluded from export |
| Dynamic Field Labels | Excluded from export |
我们现在正在迁移到 Pytest-BDD 而不是 Behave。但是我在 Pytest 中找不到对上述案例的支持。我浏览了 Pytest-BDD 文档,他们对 Scenario Outline 的支持。
https://pytest-bdd.readthedocs.io/en/latest/
但我的案例不是场景大纲,因为我只需要运行这个场景一次,而不是遍历上面提到的字段-值对
我也查看了 github,我能找到的最接近的是这个,但这似乎还没有被批准。
https://github.com/pytest-dev/pytest-bdd/pull/180
Pytest 是否以任何方式支持上述场景的实现?是否有解决方法(如果不是直接方法)来处理它?
【问题讨论】: