Upsert Test Case
upsert_test_caseCreate a new test case or update an existing one by test case ID or external ID, sending only the fields you want to change; provide a name when creation is possible.
Instructions
Creates a test case or updates an existing one, and returns it.
This tool can both create new test cases and modify existing ones. Exactly
one of test_case_id or external_id must be given:
test_case_idupdates the test case with that ID; the case must already exist.external_idupdates the case with that external ID in the project, or creates a new case carrying that external ID when none exists.
Only the fields you pass are sent. A field left unset keeps its current
value on an update, so this tool cannot clear a field to empty. Pass name
when the call may create a case.
Unlike add_test_case, this endpoint looks the suite and section up by NAME only: a suite or section ID is answered with "Test suite does not exist". With create_missing_suite or create_missing_section set, an ID passed by mistake would instead create a suite or section named after it. The test case type accepts an ID or a name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | name of the test case | |
| project | Yes | ID, name or external ID of the project | |
| test_suite | No | name of the test suite (not its ID) | |
| description | No | description of the test case | |
| external_id | No | external ID used to find the case to update, or to assign to the case being created | |
| test_case_id | No | UUID of an existing test case to update | |
| custom_fields | No | object of custom field values, keyed by the field's key. Keys and value shapes are specific to the tenant and depend on the field type. Tuskr's own example uses `stepsWithExpectedResults`, a `multi_select` field and a `date` field. | |
| test_case_type | No | ID or name of the test case type | |
| test_suite_section | No | name of the section in the suite (not its ID) | |
| create_missing_suite | No | create the test suite when it does not exist (Tuskr default: it does not) | |
| create_missing_section | No | create the section when it does not exist (Tuskr default: it does not) | |
| estimated_time_in_minutes | No | estimated execution time, whole minutes, at least 1. Tuskr rejects 0 ("Validation min on estimatedTimeInMinutes failed"), so 0 is rejected here first |