Search code examples
cucumbercapybaraphantomjspoltergeist

Lots of output from Cucumber tests when using Poltergeist/PhantomJS


I am seeing lots of output when running my cucumber tests using Poltergeist. I have most options set to false in my env.rb but I still continue to see things. Any ideas on how I can turn off this additional logging?

Below is the output that I am seeing.

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

My env.rb file

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)

Additional Info

  • capybara (2.1.0)
  • cucumber (1.3.15)
  • poltergeist (1.6.0)
  • PhantomJS = 2.0.0

Solution

  • :phantomjs_logger is where the output will be logged. Try specifying a log file, as the default is STDOUT e.g.

    :phantomjs_logger => File.open("log/test_phantomjs.log", "a")