saucectl

module
v0.59.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2021 License: Apache-2.0

README

saucectl

build

A command line interface for the Sauce Labs Testrunner Toolkit. This repository contains the Go binary that you use to kick off tests. If you look for more documentation on it, please have a look into our example repo.

For information on how to contribute to saucectl please have a look into our contribution guidelines.

Requirements

  • Docker installed
  • Make sure the Docker daemon is running (e.g. docker info works in your terminal)

Install

cURL
curl -L https://saucelabs.github.io/saucectl/install | bash
NPM
npm install -g saucectl
Homebrew
brew tap saucelabs/saucectl
brew install saucectl

FAQ

Please consult the FAQ before using saucectl.

Using saucectl

The new Command

saucectl new

This command will ask you to choose one of the frameworks:

After that, a ./sauce/config.yml file and an example test under the tests directory will be created, where you can start working from.

The run Command

saucectl run

This command will run the test based on the ./.sauce/config.yml file.

The configure Command

saucectl configure

This command ask you to type-in your SauceLabs username and access key.

You can also use the following command to do it in batch mode:

saucectl configure -u <MyUser> -a <MyAccessKey>

The credentials are store in $HOME/.sauce/credentials.yml

The signup Command

saucectl signup

This command provides a link to sign up for a SauceLabs free trial account.

Flags
config
saucectl run --config <path>

Using the --config flag will run the tests specified by that config file.

env
saucectl run --env <key1>=<value1> --env <key2>=<value2> ...

Using the --env flag will define environment variables that are then available for use by the test framework.

ci-build-id
saucectl run --ci-build-id <value>

Using the --ci-build-id flag will override the build ID that is otherwise determined based on the CI provider. The config file hash will still be used in addition to this provided CI build ID.

region
saucectl run --region <region>

Using the --region flag will set the Sauce Labs region for the test execution. The region corresponds to the available regions at saucelabs.com and affects where your job information and assets are going to be stored.

timeout
saucectl run --timeout <seconds>

Using the --timeout flag will set the test timeout for the test runner framework.

suite
saucectl run --suite <suite_name>

Using the --suite flag will only run specified suite by name.

Private registry

In case you need to use an image from a private registry you can use environment variables for authentification;

export REGISTRY_USERNAME=registry-user
export REGISTRY_PASSWORD=registry-pass

and in your config.yml setup the image name to your registry like:

image:
  base: quay.io/saucelabs/stt-cypress-mocha-node

Licensing

saucectl is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL