Setting up Testem — Chrome headless in Jenkins

2 min read • 15th July 2017
Image of codebase that shows automated test cases

Most ember apps when created new or that are existing all along have phantomJS configured for running tests. phantomJS runs a little flaky for some tests that involve keyboard events. And phantomJS is no longer actively maintained due to the arrival of Google Chrome headless support.

Link to this sectionStep 1: Installing Google Chrome in Linux machines

You may also refer: https://www.tecmint.com/install-google-chrome-in-debian-ubuntu-linux-mint/ if you face any issues with installing Google Chrome with the above steps.

Link to this sectionStep 2: Setting up Chrome headless for QUnit instead of phantomJS

Remove testem.json if you have it configured, and move the contents to testem.js (though this is not mandatory, testem itself throws a warning when you have both). Add the following in the testem.json file and remove phantomJS configurations.

Link to this sectionStep 3: Debugging in dev for visual representation

Launch chrome with http://localhost:7357 Using 9222 port should also work for remote debugging using http://127.0.0.1:9222


Link to this sectionFor more inputs on Google chrome headless

https://developers.google.com/web/updates/2017/04/headless-chrome


Link to this sectionWhy Chrome headless and why not phantomJS

PhantomJS: Stepping down as maintainer | Hacker News

While headless chrome might be able to replace PhantomJS for many use cases that doesn't necessarily mean the APIs will - news.ycombinator.com


Link to this section[Announcement] Stepping down as maintainer

PhantomJS no longer maintained - Build Chain, JS Testing, … · Issue #547 · SharePoint/sp-dev-docs

"…PhantomJS is no longer maintained anymore. I guess we will see and replacement…" github.com