ruby-on-rails – 在服务器上没有跟踪的Capybara服务器和浏览器
出于某种原因,我的一个黄瓜测试似乎在恶作剧驱动程序和rails服务器上都失败了.
我对浏览器崩溃进行了全面跟踪,但在服务器端几乎没有任何内容. 当我打开Capybara截图时,我看到了
当我拖尾test.log
(并没有痕迹) 我试过了 >设置config.action_dispatch.show_exceptions = true 如何在服务器端获得完整的回溯? 编辑 > Capybara 2.13.0 解决方法
我从
this answer得到了一些东西!
因此解决方案是允许在ActionController :: Base中挽救异常.在我的env文件中,我有以下几行误导 # There are two ways to allow Rails to rescue exceptions: # # 1) Tag your scenario (or feature) with @allow-rescue # # 2) Set the value below to true. Beware that doing this globally is not # recommended as it will mask a lot of errors for you! # ActionController::Base.allow_rescue = false 通过添加@ allow-rescue标签,我在test.log中显示了更全面的错误跟踪,以及前端错误视图 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |