处理测试中预期的失败
背景:我有一个相对较大的 Cucumber 测试套件。问题是,有几个测试用例会由于已知的错误而失败,这些错误可能在一两个月内不会得到修复。这意味着每当我自己或其他人需要运行测试套件时,我们都会遇到几次失败,然后必须花时间挖掘测试结果并找出哪些是预期的,哪些是新的。
快速而肮脏的解决方案是简单地注释掉测试用例。我遇到的问题是,当错误被修复时,不能保证注释掉的测试用例将被取消注释。
问题:Cucumber 中是否有一种简单的方法来区分预期失败和意外失败?
Background: I have a relatively large Cucumber test suite. The problem is that there are several test cases that will fail due to known bugs that probably won't be fixed for a month or two. This means that whenever myself or someone else needs to run the test suite, we get several failures and then have to spend time digging through the test results and figuring out which ones were expected and which ones are new.
The quick and dirty solution is to simply comment the test cases out. The problem I have with that is that when the bugs are fixed there is no guarantee that the commented out test case will be uncommented.
Question: Is there a simple method in Cucumber to separate the expected failures from the unexpected ones?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以将它们标记为 @wip
默认的 cucumber 调用将忽略 @wip 场景
顺便说一句
rake cucumber:ok #will run all the scenens except the @wip those
rake cucumber:wip #will run只是 @wip 标记的场景
rake cucumber #与 rake cucumber 相同的行为:ok
You can tag them as @wip
The default cucumber call will ignore the @wip scenarios
Btw
rake cucumber:ok #will run all the scenarions except the @wip ones
rake cucumber:wip #will run just the @wip tagged scenarios
rake cucumber #same behavior as rake cucumber:ok