May 2018
Intermediate to advanced
512 pages
11h 3m
English
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:
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', ...Read now
Unlock full access