Skip to main content
Version: 4.7.8

Test cases - Create multiple

Create multiple test cases with createTestCases().

Example

typescript
const creationCount = await createTestCases({
pipelineSlug: "example-pipeline",
testCases: [
{
name: `TC 1`,
inputs: { a: 1, b: 2 },
expectedOutputs: { c: 3 },
},
],
});
 
console.log("Created test case count: ", creationCount);

Arguments

payload

Types

🛠️ CreateMultipleTestCase

This type defines the structure for creating multiple test cases.

pipelineSlug: string
testCases: CreateMultipleTestCasesTestCasesInner[]
🛠️ CreateMultipleTestCasesTestCasesInner

This type defines the structure for creating a single test case.

name?: string

inputs?: object

expectedOutputs?: object

Return value

creationCount: number

The number of test cases created as a number.