Skip to main content
Version: 4.7.8

Test cases - Get multiple

Get all test cases for a given pipeline with getTestCases().

Example

typescript
const cases = await getTestCases("example-pipeline");
 
for (const testCase of cases) {
console.log("Case: ", testCase.name, testCase.id);
}

Arguments

pipelineSlug: string

Learn about pipelines here. Create a new pipeline here.

Return value

Returns an array of TestCases.

🛠️ TestCase

The TestCase type represents the structure of a test case. Below are the fields of the TestCase type.

id: string (UUID)

createdAt: string (ISO 8601)

archivedAt?: string (ISO 8601)

updatedAt: string (ISO 8601)

expectedOutputs?: object An object representing the expected outputs for the test case.

inputs: object An object containing input data for the test case.

name: string

pipelineId: string (UUID)