Public | Automated Build

Last pushed: 2 years ago
Short Description
Protractor 2.x with jasmine-reports on a top of official node.js docker
Full Description

#Usage

##SeleniumHQ:

docker run -d -p 0.0.0.0:4444:4444 --name selenium-hub selenium/hub:2.45.0
docker run -d --name selenium-ff --link selenium-hub:hub selenium/node-firefox:2.45.0
docker run -d --name selenium-chr --link selenium-hub:hub selenium/node-chrome:2.45.0

##Protractor:

docker run -it --link selenium-hub:selenium-hub -v "$PWD":/usr/src/myapp -w /usr/src/myapp devdetonator/protractor:2.1.0 protractor --specs spec/my_spec.js

where $PWD is your project dir.

To make Protractor work properly with Selenium and really do JUnit-like reports, you should have protractor.conf.js like:


exports.config = {
  seleniumAddress: 'http://selenium-hub:4444/wd/hub',
  specs: [
    'spec/*_spec.js'
  ],
  onPrepare: function() {
    require('jasmine-reporters');
    jasmine.getEnv().addReporter(
        new jasmine.JUnitXmlReporter('test-results', true, true)
    );
  },
}
Docker Pull Command
Owner
devdetonator
Source Repository

Comments (0)