Create Test Case
create_test_caseAdd new test cases to QA Sphere, supporting standalone and template types with configurable steps, tags, requirements, and parameter substitutions for templates.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectCode": "<projectCode>",
"title": "<title>",
"type": "<type>",
"folderId": "<folderId>",
"priority": "<priority>"
},
"name": "create_test_case"
}
}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 |