如果以“rake cucumber:wip”运行,为什么测试会通过?并因“rake cucumber:all”而失败
我有一个功能文件和步骤定义。我将 @wip 放在功能文件的顶部。然后我运行
rake cucumber:wip
并通过了 8 次测试,没有失败。 然后我所做的就是从功能文件中删除 @wip 并运行
rake cucumber:all
,我的步骤定义之一因 nil 指针而失败。 我只能想到两件事: 1. wip 和默认配置文件之间存在差异,但当我查看 cucumber.rake 文件时,它们似乎是相同的 2. 将我的功能测试与其他功能测试或数据库事务一起运行会消除某些内容。 有人见过这样的事情吗?
轨道2.2.2 黄瓜0.7.2 黄瓜导轨 0.3.1
I have a feature file and step definitions. I put @wip at the top of the feature file. Then I run
rake cucumber:wip
and I get 8 passed tests, no fails.
Then all I do is remove the @wip from the feature file and run
rake cucumber:all
and one of my step definitions fails with a nil pointer.
I can only think of two things:
1. there is a difference between the wip and default profiles, but when I look in cucumber.rake file they appear to be the same
2. there is something about running my feature tests with the other feature tests or database transactions that is wiping something out.
Has anybody seen something like this before?
Rails 2.2.2
cucumber 0.7.2
cucumber-rails 0.3.1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
rake cucumber:wip
使用--wip
开关运行 cucumber。这使得cucumber“恢复”场景的结果:如果执行过程中发生错误,则“成功”;如果所有步骤顺利进行,则报告失败。
这个想法是,如果所有步骤都运行没有错误,则它不是“正在进行的工作”,并且不应再被视为(标记)。
rake cucumber:wip
runs cucumber with the--wip
switch.This makes cucumber "revert" the results of scenarios: if an error occurs during execution it "succeeds"; if all steps run smoothly, it reports a failure.
The idea is that if all steps run without errors, it is not a "work in progress" and shouldn't be considered (tagged) as such anymore.