Skip to content

feat: add hidden command group for AI Test Authoring - #1099

Open
arvinddotsingh wants to merge 2 commits into
mainfrom
feat/ai-authoring-phase1
Open

arvinddotsingh wants to merge 2 commits into
mainfrom
feat/ai-authoring-phase1

Conversation

@arvinddotsingh

Copy link
Copy Markdown
Contributor

Description

Adds a first CLI surface for Sauce Labs AI Test Authoring, backed by
the same REST backend the VS Code and IntelliJ plugins use:

  • saucectl ai testcases list|get|rename|delete — manage saved test
    cases (-o text|json, --search/--limit/--skip filters)
  • saucectl ai run <testCaseID> — run a saved test case in the cloud,
    poll to completion, and exit non-zero on failure (CI-friendly);
    --async, --build, --tunnel-name, --browser/--platform overrides
  • saucectl ai run-suite <testSuiteID> — run every test case of a
    suite concurrently and aggregate the results (the backend has no
    suite-level run endpoint, so the suite is fanned out client-side)

Implementation notes:

  • internal/aiauthoring holds the domain types and service interfaces;
    internal/http/aiauthoring.go is the REST client (Basic auth,
    requested-by client-identity header, retryable GETs, non-retried
    mutations, enveloped-response normalization, structured
    AIAuthoringAPIError with the backend's error code/detail).
  • Commands are gated on the fail-closed ai_authoring.enabled org
    entitlement, distinguishing "not in plan" from verification failures.
  • Run polling uses GET testcases/{id}/runs/{runId}: the job ids in the
    run-start response are internal to the backend and not resolvable via
    the Resto/RDC job APIs; sauceJobId, url, and success appear on the
    run resource as the run progresses. VDC job URLs are constructed
    from sauceJobId because the backend omits them.
  • Test cases authored with an empty (rather than absent)
    runSettings.scTunnelName fail to start with SC_TUNNEL_NOT_FOUND; runs
    neutralize such tunnels by sending an explicit scTunnelName: null.

The ai group ships hidden until the feature is ready for release.

@arvinddotsingh
arvinddotsingh requested a review from a team as a code owner August 20, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant