saucectl authoring
Manage Sauce AI for Test Authoring assets from the command line: test cases, test suites, schedules, and variables. You can also author new test cases from a plain-language description.
Requirements
saucectlversion 0.216.2 or later. This is the first version withauthoringcommands that is published to npm.- Sauce AI for Test Authoring, a paid add-on for Enterprise accounts.
saucectlchecks your entitlement each time you run anauthoringcommand. - Your Sauce Labs credentials, set with
saucectl configureor theSAUCE_USERNAMEandSAUCE_ACCESS_KEYenvironment variables.
Usage
$ saucectl authoring [command] [flags]
Commands
| Command | Alias | Description |
|---|---|---|
testcases | testcase, tc | Inspect, run, author, and export AI-authored test cases. |
testsuites | testsuite, ts | Group test cases into suites and run them. |
schedules | schedule, test-schedules | Run test suites on a recurring schedule. |
variables | variable, var | Manage shared values available to authored tests. |
download-artifact | artifact | Download an artifact captured during authoring, such as a step screenshot. |
Global Options
These options apply to every saucectl authoring command.
| Flag | Shorthand | Description |
|---|---|---|
| --region | -r | The Sauce Labs region. Options: us-west-1 (default), us-east-4, eu-central-1, and asia-south-2. |
Common Behavior
- Output format: Most commands accept
--out(-o) withtext(default) orjson. Usejsonto pipe results into tools such asjq. - Paging: List commands return 20 results by default. Use
--skipand--limitto page through results, or--allto fetch every result. - Confirmation: Delete commands ask for confirmation before they delete anything. When
saucectlis not running interactively, such as in a CI job, you must pass--yes(-y) to confirm.
tip
The authoring commands start runs and return immediately. To run authored test suites in a pipeline, wait for the results, and fail the pipeline when a test fails, use saucectl run with a kind: authoring configuration instead.
Examples
saucectl authoring testcases list --tag smoke
saucectl authoring testcases get <test-case-id> --show-steps
saucectl authoring testsuites create --name "Checkout" --test-case <test-case-id>
saucectl authoring variables create --scope org --name password --secret --value-from-env PASSWORD