使用Poltergeist运行我的黄瓜测试时,我看到很多输出。我的env.rb中有大多数选项设置为false但我仍然继续看东西。关于如何关闭这个额外的日志记录的任何想法?
以下是我看到的输出。
MIXPANEL REQUEST:
[object Object]
MIXPANEL NOTIFICATION CHECK
MIXPANEL PEOPLE REQUEST:
[object Object]
MIXPANEL PEOPLE REQUEST:
[object Object]
MIXPANEL REQUEST:========================== 99 ==================================> | ETA: 00:00:03
[object Object]
MIXPANEL NOTIFICATION CHECK
MIXPANEL PEOPLE REQUEST:
[object Object]
674/674 |================================= 100 ==================================>| Time: 00:11:44
84 scenarios (84 passed)
674 steps (674 passed)
11m44.357s
我的env.rb文件
Capybara.register_driver :poltergeist do |app|
options = {
:js_errors => false,
:phantomjs_logger => false,
:timeout => 120,
:debug => false,
:phantomjs_options => ['--load-images=no', '--disk-cache=false'],
:inspector => false,
}
Capybara::Poltergeist::Driver.new(app, options)
其他信息
答案 0 :(得分:0)
:phantomjs_logger
是记录输出的地方。尝试指定日志文件,默认为STDOUT,例如
:phantomjs_logger => File.open("log/test_phantomjs.log", "a")