This page explains how to run your WebdriverIO tests in Sauce Orchestrate with
What You'll Need
- A Sauce Labs account (if you don't have one, start a free trial)
- Your Sauce Labs Username and Access Key
- Node.js to use the NPM package manager
- A GitHub account
- Access to a Docker registry. This example uses DockerHub.
- Docker installed if you want to modify and rebuild the example docker image.
How Orchestrate Works
Sauce Orchestrate uses container technology to package and run your tests in the Sauce Labs cloud. See How it Works for more details.
The following example uses a project with a
saucectl configuration file that is set up to run in Orchestrate. See
saucectl Configuration for more information about the configuration and run options available. The example also has a Dockerfile for building the container image. See Building Images for more information about creating your own container images.
Step 1: Clone the Project
git clone https://github.com/saucelabs/saucectl-imagerunner-example.git
git clone email@example.com:saucelabs/saucectl-imagerunner-example.git
Step 2: Link Your Sauce Labs Account
saucectl requires access to a valid Sauce Labs account.
saucectl uses your Sauce Labs credentials as environment variables and prioritizes them over values in the
credentials.yml file when both are present. If you have set them, you may skip this step. Not sure if you have them set? Run the following command to check:
If a value is returned for both variables, they are set.
Enter your Sauce Labs Username and Access Key at the prompts.
Step 3: Install
Navigate to the WebdriverIO example in the project you just cloned, then install
npm install -g saucectl
Step 4: Run Tests Using saucectl
Run the WebdriverIO tests.
The console displays the running tests, distinguishing which mode is running.
After the tests are run,
saucectl outputs the command logs from Orchestrate and downloads the artifacts from the container.
The following is an example CLI output.
13:36:16 INF Downloading artifacts archive
Name Duration Status Attempts
✔ WebdriverIO in ImageRunner 1m1s Succeeded 1
✔ All suites have passed 1m13s
The results and test assets are also available immediately following test completion in your Sauce Labs account.