create_test_case
Create test cases with step-by-step, plain text, or BDD scripts, including custom fields, parameters, and issue links. Leverage existing test cases as templates.
Instructions
Create a new test case with STEP_BY_STEP, PLAIN_TEXT, or BDD content. To match your project's structure, use the zephyr://testcase/EXISTING-KEY resource to fetch a real test case and use its structure as a template, especially for custom_fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Test case name (required) | |
| folder | No | Folder path (optional, e.g., "/Orbiter/Cargo Bay") | |
| labels | No | Array of labels (optional) | |
| status | No | Test case status (optional, default: "Draft"). Value must match a status name configured in your Zephyr project (e.g. "Draft", "Approved", "Deprecated"). Note: always overridden to "Draft" on creation. | Draft |
| owner_id | No | Test case owner Jira Account ID (optional, Cloud only — e.g. "5b10a2844c20165700ede21g") | |
| priority | No | Test case priority (optional). Value must match a priority name configured in your Zephyr project (e.g. "High", "Normal", "Low", "Critical"). Use zephyr://testcase/EXISTING-KEY to check your project's valid values. | |
| objective | No | Test objective (optional) | |
| parameters | No | Test parameters for data-driven testing (optional) | |
| issue_links | No | Array of Jira issue keys to link to this test case (e.g. ["PROJ-123", "PROJ-456"]). On Cloud, each key is resolved to a numeric Jira issue ID via the Jira REST API, then linked via POST /testcases/{key}/links/issues — failures are reported as warnings but do not fail the tool call. On Data Center, sent directly in the create payload. | |
| project_key | Yes | Project key (required) | |
| test_script | No | Test script object containing type and content | |
| component_id | No | Jira component ID (optional, Cloud only — use the numeric component ID, not the name) | |
| precondition | No | Test precondition (optional) | |
| custom_fields | No | Custom fields object (optional). Use the zephyr://testcase/EXISTING-KEY resource to fetch a real test case and copy its customFields structure. Common examples: {"Type": "Functional", "Priority": "P2", "Regression": false, "Execution Type": "Manual - To Be Automated", "Risk Control": false} | |
| estimated_time | No | Estimated time in milliseconds (optional) |