The protractor testing tool officially supports running against Chrome in headless mode. In order to execute Angular tests in a continuous integration environment, you will need to configure your test runner, Karma, to run with a headless Chrome instance:
- Update karma.conf.js to include a new headless browser option:
src/karma.conf.js...browsers: ['Chrome', 'ChromiumHeadless', 'ChromiumNoSandbox'],customLaunchers: { ChromiumHeadless: { base: 'Chrome', flags: [ '--headless', '--disable-gpu', // Without a remote debugging port, Google Chrome exits immediately. '--remote-debugging-port=9222', ], debug: true, }, ChromiumNoSandbox: { base: 'ChromiumHeadless', flags: ['--no-sandbox', '--disable-translate', ...