Sauce CTL

This page provides command line references for saucectl, the CLI tool used with Testrunner Toolkit.

Please refer to the repository README for installation, development, and contribution requirements.

Commands#

configure#

Description: Sets your Sauce Labs authentication credentials and generates a credentials.yml file. Please refer to the installation page for further information.

Example:

saucectl configure

new#

Description: Prompts you to choose one of the supported frameworks. Based on the chosen framework, this command also generates:

  • a configuration file (e.g. ./sauce/config.yml)
  • a test directory (e.g. cypress/)
  • an example test (e.g. example.test.js)

Example:

saucectl new

run#

Description: Executes tests based on information in the configuration file (.sauce/config.yml).

Example:

saucectl run

Flags#

ccy#

Description: Increases your Sauce Labs VM concurrency when running tests remotely on the Sauce Labs Cloud.

Example:

saucectl run --ccy 2

NOTE: Concurrency with saucectl is tied to the test suites field in your .sauce/config.yml. For example if you have ten .spec files split across two tests suites, and you set --ccy to 10, the max concurrency is 2.

ci-build-id#

Description: Overrides 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.

Example:

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

config#

Description: Run tests from a specific configuration file.

Shorthand: -c

Example:

saucectl run --config </path/to/config.yml>

env#

Description: Defines environment variables that are available for use by the test framework.

Example:

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

region#

Description: Sets the Sauce Labs region for test execution. The region corresponds to the available region at saucelabs.com and affects where your job information and assets are going to be stored.

Example:

saucectl run --region <region>

suite#

Description: Specifies a test suite to execute by name.

Example:

saucectl run --suite <suite_name>

test-env#

supported frameworks: Cypress

Description: Specifies the test execution environment:

  • test locally with docker containers
  • test remotely on sauce virtual machines

Example:

saucectl run --test-env <sauce | docker>

timeout#

Description: Sets the timeout for test runs.

Example:

saucectl run --timeout <seconds>

tunnel-id#

Sauce Cloud only

Description: Sets the tunnel id for a given test run and the chosen Testrunner framework.

Example:

saucectl run --tunnel-id <tunnel-id>

tunnel-parent#

Sauce Cloud only

Description: Sets the tunnel parent for a given test run and the chosen Testrunner framework.

Example:

saucectl run --tunnel-id <tunnel-id> --tunnel-parent <tunnel-parent>

NOTE: This flag only works in conjunction with the tunnel-id flag.

dry-run#

Sauce Cloud only

Description: Simulate a test run without actually running any tests.

Example:

saucectl run --dry-run

verbose#

Description: Use the --verbose flag to troubleshoot potential authentication, connection, and/or container issues.

Example:

saucectl run --verbose

Licensing#

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

Last updated on by Nancy Sweeney