假设我有一组相关的特征 X、Y 和 Z。每个特征都有一个我充实的场景的详细列表。
有没有办法使用 Cucumber 断言所有三个功能都已实现?
类似于:
Scenario Outline: All gamma features are ready
Given feature <f> is part of the gamma release
When I try to use feature <f>
Then feature <f> should just work
Scenarios:
| f |
| X |
| Y |
| Z |
Then /feature (\S*) should just work/ do |f|
`cucumber -t@#{f}` # except less repetitive and more awesome
end
我知道我可以创建一个 gamma 标签并针对它运行,但我想以某种方式记录整个 gamma 版本已准备就绪。也许这没有意义,但我脑子里也不是很清楚。
最佳答案
也许你在反过来想?
也许您需要的是标记所有正在为 future 版本开发的内容。然后你运行:
cucumber -t~@delta,~@epsilon
消除 future 的 delta 和 epsilon 版本功能并运行 alpha、beta 和 gamma 功能。
这似乎会更容易实现,因为您将获得“未标记”alpha、beta 和 gamma 功能的完全回归。
另一种选择是简单地标记正在开发的内容,并在功能准备就绪时删除这些标记。
cucumber -t ~@in_dev
关于ruby - Cucumber 是否支持元功能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5172499/