HUB
Sign inSign up

amarbir22/nodejs-chrome-java

By amarbir22

•Updated over 7 years ago

Docker image to run self container protractor tests

Image
0

312

amarbir22/nodejs-chrome-java repository overview

⁠nodejs-chrome-java

Docker image for running protractor tests or any Selenium based tests. Docker Repo⁠

⁠Sample Protractor Config

    SELENIUM_PROMISE_MANAGER: false,
    directConnect: true,

    baseUrl: BASE_URL,

    capabilities: {
        browserName: "chrome",

        chromeOptions: {
            args: [ "--headless", "--no-sandbox"]
        }
    }

⁠Running Test

  • Create a npm script to run your tests in package.json
  • Either install dependencies or create a pretest script
  • Note: As the volume is being attached to the image. Make sure the node modules are linux compatible.
docker run --rm -v $(pwd):/vol -w /vol amarbir22/nodejs-chrome-java /bin/bash -c 'npm run test'

⁠Expandability

As node and Java is pre-installed, You can run tests based on various frameworks such as Webdriver.IO, NightwatchJS etc. Install Selenium Server etc.

⁠Thanks

Special thanks to Jessie Frazelle⁠ for her great work on Containerization.

Tag summary
Recent tags
Content type
Image
Digest
Size
296.3 MB
Last updated
over 7 years ago
docker pull amarbir22/nodejs-chrome-java:latest