Sauce Labs has an exciting new feature for running your tests with Hosted Orchestration
This mono-repo has example code in Java & Python (more language examples soon) for how to run a small set of tests locally, remotely on Sauce Labs, and hosted by Sauce Labs for comparison.
- Get your username and access key
- Set an environment variable for Sauce Labs Username as
SAUCE_USERNAME
- Set an environment variable for Sauce Labs Access Key as
SAUCE_ACESS_KEY
- Create an account
- Set an environment variable for Docker Hub Username as
DOCKER_USERNAME
- Set an environment variable for Docker Hub Password as
DOCKER_PASSWORD
- Install Git
- Fork this Repo on GitHub
- Go to your new fork, click the big green "Code" button and copy the https line
- Make a new directory for your projects if you don't have one already
mkdir ~/projects
- Clone from your fork onto your machine
cd ~/projects git clone <LINK_COPIED_IN_STEP_2>
- Download
- Open the application
- In a terminal run this to make sure it is running:
docker info
If Docker is not running you get an error like:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
You can only run one language at a time, so make sure you change directories into the language subdirectory, and check out the README:
This repo also defines workflows for kicking off tests from Github Actions.
- make sure you have properly forked this code to your own organization (instructions above)
- Add these secrets to github: (https://github.com/<YOUR_GITHUB_ORG>/hto/settings/secrets/actions)
- SAUCE_USERNAME
- SAUCE_ACCESS_KEY
- DOCKER_USERNAME
- DOCKER_PASSWORD
- Go to https://github.com/<YOUR_GITHUB_ORG>/hto/actions
- Click the workflow you want to execute on the left hand side
- Click the "Run Workflow" button on the right side and select "main"
Bug reports and pull requests are welcome on GitHub at https://github.com/saucelabs-training/hto.
The code is available as open source under the terms of the MIT License.