This image contains a fully configured environment for running Protractor tests
under Chromium and Firefox browsers.
- Xvfb The headless X server, for running browsers inside Docker
- npm Node.js package manager used to install Protractor and any specific node.js modules the tests may need
- Selenium webdriver Browser instrumentation agent used by Protractor to execute the tests
- Java 8 SE Needed by Selenium
- Chromium The OSS core part of Google Chrome browser
- Firefox Firefox browser
- Protractor An end-to-end test framework for web applications
- Supervisor Process controll system used to manage Xvfb and Selenium background processes needed by Protractor
In order to run tests from a CI system, execute the following:
docker run --rm -v <test project location>:/project --env NAME=<suite> --env URL=<url> soltysrr/protractorjs-headless-with-params
The container will terminate automatically after the tests are completed. The output of supervisord visible on the console
is not interesting in most circumstances. You should check
target/supervsor.out file to see the output of Protractor.
Dispalying the file in an Unix terminal using
cat is recommended over opening it using an editor because the file contains ANSI escape sequences.
If you want to run the tests interactively you can launch the container and enter into it:
CONTAINER=$(docker run -d --shm-size=3g -v <test project location>:/project --env MANUAL=yes soltysrr/protractorjs-headless-with-params) docker exec -ti $CONTAINER sudo -i -u node bash
When inside the container you can run the tests at the console by simply invoking
When things don't work as expected, you should check Selenium WebDrover output in
When you are done, you terminate the Protractor container with
docker kill $CONTAINER