Create Test Case
create_test_caseCreate a new test case in QA Sphere, either standalone or from a template with parameter substitution. Supports steps, tags, and requirements.
Instructions
Create a new test case in QA Sphere. Supports both standalone and template test cases with various options like steps, tags, requirements, and parameter values for templates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pos | No | Position within the folder (0-based index) | |
| tags | No | List of tag titles | |
| type | Yes | Type of test case. A 'template' test case uses `${var}` placeholders in its title, precondition, and step fields; each entry in `parameterValues` substitutes those placeholders to generate one filled test case. | |
| links | No | Additional links relevant to the test case | |
| steps | No | List of test case steps | |
| title | Yes | Test case title. In template test cases, may contain `${var}` placeholders that are substituted via `parameterValues` to produce filled test case titles. | |
| comment | No | Test case precondition (HTML format). DEPRECATED — prefer the `precondition` object | |
| isDraft | No | Whether to create as draft | |
| folderId | Yes | ID of the folder where the test case will be placed. Use upsert_folders tool to create new folders or get existing folders. | |
| priority | Yes | Test case priority | |
| projectCode | Yes | Project code identifier (e.g., BDI) | |
| customFields | No | Custom field values. Keys are custom field system names. Custom fields must exist in the project (created via the web UI). | |
| precondition | No | Test case precondition: either `{sharedPreconditionId}` to reference a shared one, or `{text}` for a standalone precondition | |
| requirements | No | Test case requirements | |
| parameterValues | No | One set of parameter substitutions per filled test case to generate from the template. Applies only when `type` is `template`; ignored for standalone test cases. A placeholder with no matching key is left untouched (e.g., `${action}` with no `action` value stays literal). | |
| filledTCaseTitleSuffixParams | No | Parameter names whose substituted values are appended to each filled test case title for disambiguation (e.g., pass `["env"]` to suffix titles with the `env` value). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique identifier of the created test case | |
| seq | Yes | Sequence number of the test case in the project |