Skip to main content

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​

  • saucectl version 0.216.2 or later. This is the first version with authoring commands that is published to npm.
  • Sauce AI for Test Authoring, a paid add-on for Enterprise accounts. saucectl checks your entitlement each time you run an authoring command.
  • Your Sauce Labs credentials, set with saucectl configure or the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables.

Usage​

$ saucectl authoring [command] [flags]

Commands​

CommandAliasDescription
testcasestestcase, tcInspect, run, author, and export AI-authored test cases.
testsuitestestsuite, tsGroup test cases into suites and run them.
schedulesschedule, test-schedulesRun test suites on a recurring schedule.
variablesvariable, varManage shared values available to authored tests.
download-artifactartifactDownload an artifact captured during authoring, such as a step screenshot.

Global Options​

These options apply to every saucectl authoring command.

FlagShorthandDescription
--region-rThe 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) with text (default) or json. Use json to pipe results into tools such as jq.
  • Paging: List commands return 20 results by default. Use --skip and --limit to page through results, or --all to fetch every result.
  • Confirmation: Delete commands ask for confirmation before they delete anything. When saucectl is 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