Headless Chrome on CircleCI

Following up from my post on our blog.

I’d love to get some feedback of people who have switched their test suites to use Chrome in headless mode.

  • What were the problems you ran into?
  • What’s your stack? (Rails with Rspec/Capybara, etc)
  • How has it improved your build performance?

Just some ideas for questions, the more details you can provide the better!

THANKS!

1 Like

Since it’s mentioned in the blog post, I don’t mind sticking up for PhantomJS, driven by PHPUnit and Spiderling. I do 110+ page operations in a SPA, various FTP/SSH ops, and 380 assertions in a single CircleCI machine, in around 9 minutes. It’s been fairly rock-solid for six months.

Perhaps I am just not pushing it hard enough :smiley_cat:

1 Like

Our stack: Ruby library for Rails 5.1+, we run tests using our own Docker image, we generate a Rails app in each suite to run the tests against it.

We’re using Chrome Headless, no problems found, makes us feel more confident about our tests.

Repo with out circleci.yml config file:

Repo with our docker images:

Ask me if you need more details!

@halfer Unfortunately, PhantomJS is no longer really supported, and soon won’t be at all, and is not really necessary, exactly because of headless Chrome.

I use headless Chrome by installing it in my docker image, as follows:

RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
    && sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
    && apt-get update \
    && apt-get install -y google-chrome-stable build-essential jq git openssh-server \
    && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV CHROME_BIN /usr/bin/google-chrome

We created a one line installer for Drupal 8 projects that sets up, among other things, Behat tests using Selenium’s headless Chrome image.

See https://github.com/Lullabot/drupal8ci/blob/master/dist/.circleci/config.yml for details.

hm, honestly speaking haven’t noticed any performance improvements after starting using headless Chrome.
stack: js, karma/jasmine, protractor/jasmine

On my end, the performance is worse than PhantomJS, and I can’t for the life of me figure out why …

Same with us, we tried switching from Capybara-webkit with QT to headless Chrome, and performance tanked by 35% or more.

Following @rtm’s earlier remark about PhantomJS, I spotted this story - looks like PhantomJS does not have a maintainer, and the original author will soon be archiving the repo, to allow forks.

This topic was automatically closed 166 days after the last reply. New replies are no longer allowed.