Skip to main content
PATCH
Update test case

Path Parameters

id
string
required

Body

application/json

Patch-style update: omitted fields are left unchanged. Nullable fields (startUrlPath, scenarioShortId, resumeFromDependencyProjectTestCaseId) accept null to clear the current value.

name
string
goal
string

The test's goal — what the agent tries to achieve.

Minimum string length: 1
expectedResult
string

The expected result, stated as a UI-observable outcome that proves the goal was met.

steps
string[]

Full replacement list of step instructions, one action per step in user-visible UI language. Pass an empty array to remove all steps and rely on the goal alone.

startUrlPath
string | null

URL path the agent navigates to before executing (e.g. /dashboard). Pass null to clear it so the test starts from its RESUME_FROM dependency's end state (or the application's base URL without one) — do not set a path on a test that has a RESUME_FROM dependency, as it would navigate away from the dependency's end state.

labels
string[]

Full replacement list of labels.

isEnabled
boolean
classification
enum<string>

POSITIVE (expected to succeed) or NEGATIVE (expected to fail).

Available options:
POSITIVE,
NEGATIVE
scenarioShortId
string | null

Move the test into an existing scenario (folder). Pass null to remove it from its current scenario.

Pattern: ^scenario(-.+_.+|_.+)$
resumeFromDependencyProjectTestCaseId
string | null

Test case (UUID) whose output state this test resumes from — the preferred way to give a test fresh, valid data instead of hardcoded entities. Pass null to remove the RESUME_FROM dependency. Combine with startUrlPath: null so the test actually starts from the dependency's end state.

waitForDependenciesProjectTestCaseIds
string[]

Full replacement list of test cases (UUIDs) that must finish before this one runs (WAIT_FOR — ordering only). Pass an empty array to remove all WAIT_FOR dependencies. Must not overlap with the RESUME_FROM dependency.

projectShortId
string

Target a specific project by its prefixed short ID (proj-slug_shortId or proj_shortId), as returned by the projects API. Required for organization-scoped API keys; project-scoped keys may only pass their own project's short ID.

Pattern: ^proj(-.+_.+|_.+)$

Response

200 - application/json

The request has succeeded.

A test case's authored configuration — what the agent is instructed to do — as distinct from a run's result (see get_run_test_case).

id
string
required

Project test case ID (UUID). Works with update_test_case, start_run_with_test_cases (testCaseIds), and rerun_run (projectTestCaseIds).

name
string
required
isEnabled
boolean
required
labels
string[]
required
classification
enum<string>
required

POSITIVE (expected to succeed) or NEGATIVE (expected to fail).

Available options:
POSITIVE,
NEGATIVE
applicationShortId
string
required
Pattern: ^app(-.+_.+|_.+)$
applicationName
string
required
scenarioShortId
string | null
required

Scenario (folder grouping related test cases) the test belongs to. null when ungrouped.

Pattern: ^scenario(-.+_.+|_.+)$
scenarioName
string | null
required
goal
string | null
required

The test's goal — what the agent tries to achieve.

expectedResult
string | null
required

The expected result / success criteria the evaluator checks against.

steps
string[]
required

Authored step instructions, in order. Empty when the test only has a goal.

startUrlPath
string | null
required

URL path the agent navigates to before executing (e.g. /dashboard). null means the test starts from its RESUME_FROM dependency's end state, or the application's base URL when it has no dependency.

resumeFromDependencyProjectTestCaseId
string | null
required

Test case whose output state this test resumes from (RESUME_FROM). null when the test starts fresh.

waitForDependenciesProjectTestCaseIds
string[]
required

Test cases that must finish before this one runs (WAIT_FOR — ordering only, no state carry-over).

createdAt
string
required
updatedAt
string | null
required
url
string
required

Deep link to edit the test case in the QA.tech UI.