Testrunner Toolkit with CircleCI

These examples can apply to virtually any CirceCI deployment, provided that you already have some existing automated tests, and are either the maintainer or an admin of the target repository.

What You'll Need#

Project Setup#

The first step is to ensure you have a CircleCI account, and to login with your git hosting provider username; the examples below use GitHub authentication.

  1. Log in to CircleCI
  2. Choose the desired repo and click "Set Up Project"
  3. Select Add Config (or Use Existing Config). This creates a new branch in your project called circle-ci-project-setup

Do not worry if your project fails to build. You need to modify the config.yml manually anyway.

Add Project Environment Variables#

In order for CirceCi to communicate with Sauce Labs you need to authenticate with project environment variables.

  1. In CirceCI, go to your Project Settings

    CircleCI Project Settings
  2. Select Environment Variables

    Add Variables in CircleCI
  3. Add variables for your Sauce Labs account credentials as SAUCE_USERNAME and SAUCE_ACCESS_KEY respectively

    CircleCI Variables

Modify the CirceCI Configuration#

In the root of your project directory, create the .circleci directory if it doesn't already exist, and open/create config.yml.

You can easily execute Saucectl on CircleCI through saucectl-run orb. Add the orb to your current config.yml using the following reference to use it:

.circleci/config.yml
loading...
See full example on GitHub

Now you can use the orb directly as a step of one of your jobs:

.circleci/config.yml
loading...
See full example on GitHub

You can reference a complete config.yml example for more detail.

Commit the updated config.yml to your git hosting service provider. Navigate back to the CirceCI dashboard to see your build pass.

CircleCI Output
Last updated on by FΓ©lix P