Distribute automated tests with Selenium Grid and Docker Swarm
Check out the post.
-
Fork/Clone
-
Create and activate a virtual environment
-
Install the requirements
-
Add the token to your environment:
$ export DIGITAL_OCEAN_ACCESS_TOKEN=[your_token]
-
Spin up five droplets and deploy Docker Swarm:
$ sh project/create.sh
-
Set the environment variable:
$ eval $(docker-machine env node-1) $ NODE=$(docker service ps --format "{{.Node}}" selenium_hub) $ export NODE_HUB_ADDRESS=$(docker-machine ip $NODE)
-
Run the tests:
$ python project/parallel_test_run.py
-
Bring down the resources:
$ sh project/destroy.sh