Test cases - Get
- TypeScript
- Python
Get a single test case for a given pipeline with getTestCase()
.
Get a single test case for a given pipeline with get_test_case()
.
Example
typescript
consttestCase = awaitgetTestCase ('0d180ab3-64b4-48e5-8e99-6e5a62303de3 ');console .log ('Case: ',testCase .name ,testCase .id );
python
import osimport gentracegentrace.init(api_key=os.getenv("GENTRACE_API_KEY"))cases = gentrace.get_test_case(case_id="0d180ab3-64b4-48e5-8e99-6e5a62303de3")print(case.get('id'))
Arguments
Return value
Returns TestCase
.
🛠️ 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)
datasetId: string (UUID)