获取“响应代码 = 500”运行黄瓜时随机出错
由于某种原因,当我运行 Cucumber 时,即使所有测试都通过了,我仍然收到 500 的响应代码。每次我运行它时,对于不同的测试,错误都会随机发生。有时所有测试也会通过。
我以为是内存问题,所以我尝试重新启动计算机,但没有任何作用。
错误的一个示例是:
And I follow "link" # features/step_definitions/web_steps.rb:33
Failed. Response code = 500. Response message = Internal Server Error. (ActiveResource::ServerError)
./app/controllers/companies_controller.rb:23:in `show'
./features/step_definitions/web_steps.rb:35
./features/step_definitions/web_steps.rb:14:in `with_scope'
./features/step_definitions/web_steps.rb:34:in `/^(?:|I )follow "([^"]*)"(?: within "([^"]*)")?$/'
features/manage_sites.feature:256:in `And I follow "link"'
它似乎与标记功能有关。我使用的是 @wip 标签,当我移动它时,它会导致零星的 500 错误。删除所有 @wip 标签将使所有测试通过。
但我可能是错的。我需要不断地尝试和复制它。
有人可以帮忙吗?
For some reason I keep getting a response code of 500 when I run cucumber, even though all the tests pass. The error occurs randomly for different tests, every time I run it. Sometimes all tests pass as well.
I thought it was a memory issue, so I tried restarting my computer, but that didn't do anything.
An example of the error is:
And I follow "link" # features/step_definitions/web_steps.rb:33
Failed. Response code = 500. Response message = Internal Server Error. (ActiveResource::ServerError)
./app/controllers/companies_controller.rb:23:in `show'
./features/step_definitions/web_steps.rb:35
./features/step_definitions/web_steps.rb:14:in `with_scope'
./features/step_definitions/web_steps.rb:34:in `/^(?:|I )follow "([^"]*)"(?: within "([^"]*)")?$/'
features/manage_sites.feature:256:in `And I follow "link"'
It seems related to the tagging feature. I was using the @wip tag, and when I moved it around, it would cause the sporadic 500 errors. Removing all @wip tags makes all the tests pass.
I could be wrong though. I'll need to try and replicate it consistently.
Would anybody be able to help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论