项目作者: serbanghita

项目描述 :
Run e2e tests with wdio and selenium-standalone in Docker containers.
高级语言: JavaScript
项目地址: git://github.com/serbanghita/webdriverio-docker.git
创建时间: 2018-05-17T18:54:02Z
项目社区:https://github.com/serbanghita/webdriverio-docker

开源协议:MIT License

下载


E2E using Webdriver.io and selenium-standalone in Docker

Sample of project running E2E tests with wdio and selenium-standalone
each existing in separate Docker instances.

See selenium-standalone Docker instance declaration
Ubuntu.dockerfile.

Run

  1. git clone git@github.com:serbanghita/webdriverio-docker.git
  2. cd my-wdio
  3. docker-compose up (-d --build --force-recreate)
  4. docker-compose ps

    1. Name Command State Ports
    2. --------------------------------------------------------------------------
    3. my-wdio_seleniumapp_1 npm run selenium Up 0.0.0.0:4444->4444/tcp
    4. my-wdio_testapp_1 tail -f /dev/null Up
  1. docker exec my-wdio_testapp_1 npm run test - You should see tests pass

Wiki

Using docker CLI command

  1. docker network create --driver bridge testing-lan
  2. docker run -d -p 4444:4444 --net testing-lan --rm --name seleniumapp serbanghita/selenium-standalone
  3. docker build -t serbanghita/my-wdio .
  4. docker run -d --net testing-lan --rm --name myapp serbanghita/my-wdio
  5. docker exec myapp npm test

Using docker-composer CLI command

  • Start: docker-compose up -d --build --force-recreate
  • Stop: docker-compose stop
  • Reconfigure: docker-compose down && docker-compose pull