Docker image to easily run Selenium tests using webdriverIO.
Best way to start is clone this repository, go to app/test/specs - you will put your tests there.
Modify your wdio.conf.js file according to this: fix your wdio
You can use multiple reporters
To use this image to run your app tests you can add the following to a docker-compose.yml
file:
https://www.realvnc.com/download/viewer/linux/
pass : secret
IP - to be determined, now they are: 0.0.0.0:32803 0.0.0.0:32802
Then simply run:
docker-compose run --rm webdriverio wdio
This image comes with the following packages preinstalled:
ERROR: Error forwarding the new session Empty pool of VM for setup Capabilities
Sometimes the browsers might not have enough time to connect to the hub. You can either:
- Make it in two steps: first run
docker-compose up -d chrome firefox hub
thendocker-compose run --rm webdriverio wdio
- Or you can add a sleep time to make sure the hub is ready:
docker-compose run --rm webdriverio bash -c "sleep 10 && wdio"
. - Command 'docker logs containername' will tell you if you have any issues with your grid.
- Remove old versions of selenium dockers (it was messing with my installation).