List tests with pagination, search, and ordering.
Optionalcursor?: stringOptionalpageSize?: numberOptionalquery?: stringOptionalordering?: "-created" | "-name" | "created" | "name"OptionallatestRun?: booleanOptionalsignal?: AbortSignalAbort signal for client-side cancellation. Throws CancellationError.
Optionaltimeout?: numberPer-request timeout in milliseconds. Overrides BugBugConfig.timeout for
this call only.
Optionalheaders?: Record<string, string>Per-request HTTP headers. These are merged first so the SDK's auth and
User-Agent headers always win — supplying Authorization here will
have no effect.
Paginated TestsListResponse envelope (validated via Zod).
Fetch every test across all pages.
Fetch a single test by ID.
UUID of the test.
The full Test resource.
Create a new empty test.
Test creation payload (at minimum, name and screenSizeType).
Optionalname?: string | nullOptionalscreenSizeType?: "desktop" | "mobile" | "custom"Optionalnotes?: string | nullTest notes
OptionalfolderId?: string | nullFormat: uuid
The newly-created Test.
Update a test. The tests endpoint accepts partial payloads via PATCH, so this and partialUpdate share the same semantics.
UUID of the test to update.
Fields to patch.
Optionalname?: string | nullOptionalscreenSizeType?: "desktop" | "mobile" | "custom"Optionalnotes?: string | nullTest notes
OptionalfolderId?: string | nullFormat: uuid
Alias for update. The tests endpoint already uses PATCH semantics.
Optionalname?: string | nullOptionalscreenSizeType?: "desktop" | "mobile" | "custom"Optionalnotes?: string | nullTest notes
OptionalfolderId?: string | nullFormat: uuid
Link an existing component/group into a test at an optional position.
UUID of the test to insert into.
{ groupId, atIndex? } insertion descriptor.
OptionalgroupId?: stringFormat: uuid
OptionalcomponentId?: stringFormat: uuid
OptionalatIndex?: number | nullInsert response with the resulting step layout.
Unlink a component/group from a test.
UUID of the test to unlink from.
Unlink descriptor identifying which component to remove.
Format: uuid
Start a test run by name or ID, optionally watching progress until completion.
When testNameOrId is a UUID the test is run directly. Otherwise it is
looked up by name first (NotFoundError on miss). When
watchProgress is true, the call polls until the run reaches a
terminal status and returns the full TestRun; otherwise it returns the
initial TestRunState synchronously after enqueueing the run.
Test UUID or human-readable test name.
OptionalprofileName?: stringOptionalvariables?: { key: string; value?: string | null }[]OptionalpollInterval?: numberOptionaltimeout?: numberPer-request timeout in milliseconds. Overrides BugBugConfig.timeout for
this call only.
OptionalonProgress?: (Optionalsignal?: AbortSignalAbort signal for client-side cancellation. Throws CancellationError.
Optionalheaders?: Record<string, string>Per-request HTTP headers. These are merged first so the SDK's auth and
User-Agent headers always win — supplying Authorization here will
have no effect.
// Fire-and-forget run by name
const status = await sdk.tests.startRun('Smoke / login');
// Run by ID, watch progress for up to 10 minutes
const run = await sdk.tests.startRun('11111111-1111-4111-8111-111111111111', {
watchProgress: true,
timeout: 600_000,
profileName: 'Production',
onProgress: (s) => console.log(`${s.id}: ${s.status} (${s.finishedSteps}/${s.totalSteps})`),
});
Start a test run by name or ID, optionally watching progress until completion.
When testNameOrId is a UUID the test is run directly. Otherwise it is
looked up by name first (NotFoundError on miss). When
watchProgress is true, the call polls until the run reaches a
terminal status and returns the full TestRun; otherwise it returns the
initial TestRunState synchronously after enqueueing the run.
Test UUID or human-readable test name.
Optionaloptions: RunTestNoWatchProgressOptionsOptionalprofileName?: stringOptionalvariables?: { key: string; value?: string | null }[]OptionalwatchProgress?: falseOptionalsignal?: AbortSignalAbort signal for client-side cancellation. Throws CancellationError.
Optionaltimeout?: numberPer-request timeout in milliseconds. Overrides BugBugConfig.timeout for
this call only.
Optionalheaders?: Record<string, string>Per-request HTTP headers. These are merged first so the SDK's auth and
User-Agent headers always win — supplying Authorization here will
have no effect.
// Fire-and-forget run by name
const status = await sdk.tests.startRun('Smoke / login');
// Run by ID, watch progress for up to 10 minutes
const run = await sdk.tests.startRun('11111111-1111-4111-8111-111111111111', {
watchProgress: true,
timeout: 600_000,
profileName: 'Production',
onProgress: (s) => console.log(`${s.id}: ${s.status} (${s.finishedSteps}/${s.totalSteps})`),
});
Fetch full test-run details including step runs.
UUID of the test run.
Fetch only the lightweight status of a test run (no step detail). Prefer this over getRun when polling.
Request cancellation of an in-progress test run.
UUID of the run to stop.
The updated status; the run may still take a moment to settle.
Fetch step-level screenshots captured during a run.
Per-step-run screenshot entries; empty array when none available.
List test runs filtered by status, time window, and optional test ID.
Optionalcursor?: stringOptionalpageSize?: numberOptionalordering?: "-created" | "created" | "-started" | "started"OptionalstartedAfter?: stringOptionalstartedBefore?: stringOptionalstatus?: OptionaltestId?: stringOptionalsignal?: AbortSignalAbort signal for client-side cancellation. Throws CancellationError.
Optionaltimeout?: numberPer-request timeout in milliseconds. Overrides BugBugConfig.timeout for
this call only.
Optionalheaders?: Record<string, string>Per-request HTTP headers. These are merged first so the SDK's auth and
User-Agent headers always win — supplying Authorization here will
have no effect.
Paginated TestRunsListResponse.
Move a step to a new position within a test's step list.
UUID of the test to reorder.
{ stepId, atIndex } move descriptor.
Format: uuid
OptionalgroupId?: stringFormat: uuid
OptionalatIndex?: numberOptionalblockId?: string | nullFormat: uuid
The updated Test with the new step ordering.
Convenience wrapper around listRuns that returns runs started in the last N hours, newest first by default.
Optionalhours?: numberLook-back window in hours (default 24).
OptionalpageSize?: numberMax runs per page (default 50).
Optionalordering?: "-started" | "started"Sort order; defaults to most-recent first.
Download the JUnit XML report for a test run. Useful for CI integrations that consume JUnit (e.g. Jenkins, GitLab CI, GitHub Actions test reporters).
The JUnit report body as a string.
Fetch test-run log output. The server may return either log content inline or a redirect/URL string — both are returned verbatim as text.
Poll a test run's lightweight /status/ endpoint until it reaches a
terminal status.
Transient network errors are retried; non-network errors propagate.
UUID of the test run to watch.
Invoked on every successful poll with the latest TestRunState
(including the terminal one). Receives finishedSteps/totalSteps/webappUrl
for in-flight progress UI.
OptionalpollInterval?: numberPoll interval in ms (default 2000).
Optionaltimeout?: numberWait timeout in ms (default 300_000 = 5 minutes).
Optionalsignal?: AbortSignalAbort signal for client-side cancellation. Throws CancellationError.
Optionaltimeout?: numberPer-request timeout in milliseconds. Overrides BugBugConfig.timeout for
this call only.
Optionalheaders?: Record<string, string>Per-request HTTP headers. These are merged first so the SDK's auth and
User-Agent headers always win — supplying Authorization here will
have no effect.
List debug artifacts (HARs, traces, etc.) produced by a test run.
Fetch a single debug artifact (e.g. HAR, network trace) for a run.
UUID of the run.
Artifact discriminator (e.g. 'har').
Export a test as YAML (string) or ZIP (Uint8Array).
UUID of the test to export.
'yaml' returns a string body; 'zip' returns binary bytes.
Optionaloptions: RequestOptionsYAML text or raw ZIP bytes, matching fmt.
Export a test as YAML (string) or ZIP (Uint8Array).
UUID of the test to export.
'yaml' returns a string body; 'zip' returns binary bytes.
Optionaloptions: RequestOptionsYAML text or raw ZIP bytes, matching fmt.
Import a single test from YAML (string) or ZIP (Uint8Array). Returns the created test summary.
YAML text or raw ZIP bytes.
Format matching payload ('yaml' or 'zip').
OptionalconflictMode?: stringOptionalsignal?: AbortSignalAbort signal for client-side cancellation. Throws CancellationError.
Optionaltimeout?: numberPer-request timeout in milliseconds. Overrides BugBugConfig.timeout for
this call only.
Optionalheaders?: Record<string, string>Per-request HTTP headers. These are merged first so the SDK's auth and
User-Agent headers always win — supplying Authorization here will
have no effect.
Tests module — manage BugBug tests and their runs.
Exposes CRUD over
/tests/, run lifecycle over/testruns/, component linking, debug artifacts, and YAML/ZIP export/import. Use startRun for the recommended high-level entry point with optional progress watching.