Sign inSign up

weboaks/node-karma-protractor-chrome

By weboaks

Updated almost 5 years ago

Run karma and protractor tests under chrome on a CI server

Image
23

5M+

weboaks/node-karma-protractor-chrome repository overview

alpine headless:
debian headless:
xvfb:

Karma and Protractor in a docker container

This image allows to run javascript tests in a headless machine like a CI server.

This image support karma and protractor test under chromium.

Unfortunately, chromium doesn't support container (https://github.com/travis-ci/travis-ci/issues/938), you need to start chromium with --no-sandbox argument to avoid this.

To configure karma and protractor, use this snippets:

karma:
browsers: ['Chromium_no_sandbox'],
customLaunchers: {
  Chromium_no_sandbox: {
    base: 'ChromiumHeadless',
    flags: ['--no-sandbox']
  }
},

ChromiumHeadless is available since [email protected], on previous versions use:

base: 'Chromium',
flags: ['--no-sandbox', '--headless', '--disable-gpu', '--remote-debugging-port=9222']
protractor:
capabilities: {
  'browserName': 'chrome',
  'chromeOptions': {
    'args': ['no-sandbox', 'headless', 'disable-gpu']
  }
},

Headless mode

Chromium recently added headless support. If you want to use headless mode use the version and follow instructions in this readme.

If you don't want to use the headless mode, use or and follow instructions in that readme

Alpine Headless

To use alpine instead of debian, follow headless instructions and add this to protractor config :

chromeDriver: '/usr/bin/chromedriver',

Gitlab CI

To run karma and protractor on gitlab ci, just use this image, and configure karma and protractor as above. http://doc.gitlab.com/ce/ci/yaml/README.html#image-and-services

On Docker Hub

https://hub.docker.com/r/weboaks/node-karma-protractor-chrome/

docker pull weboaks/node-karma-protractor-chrome

Tag summary

Content type

Image

Digest

Size

579.3 MB

Last updated

over 5 years ago

docker pull weboaks/node-karma-protractor-chrome