Skip to main content
Version: 2.0.0

Test cases - Update

Update a single test case with updateTestCase().

Arguments

payload

The payload argument is a JavaScript payload of the new test case payload (type UpdateTestCase).

info

The payload is merged with the existing test case payload. This means that you can update a single field of the test case without specifying the entire test case payload.

Return value

Case ID

The ID of the updated test case as a UUID string.

Example

typescript
const caseId = await updateTestCase({
id: "550e8400-e29b-41d4-a716-446655440000",
name: "New test case name",
})
 
console.log("Case ID: ", caseId);

Types

🛠️ UpdateTestCase

This type defines the structure for updating the properties of an existing test case. Below are the fields of the UpdateTestCase type.

id

The ID of the test case to update as a UUID string.

name

The name of the test case as a string. This field is optional and can be null.

inputs?

The inputs for the test case. This field is optional and can be null, representing the input data as a JSON object.

expectedOutputs?

The expected outputs for the test case. This field is optional and can be null, representing the expected output data as a JSON object.

archived?

The archive status of the test case as a boolean. This field is optional and can be null. If true, the test case is considered archived.