QTM4J: Create Test Case
qtm4j_create_test_caseCreate a new test case in a QTM4J project with summary, priority, status, labels, components, and steps. Auto-resolves human-readable names to IDs.
Instructions
Create a new test case in a QTM4J project. Supports auto-resolving human-readable names for priority, status, labels, and components.
Toolset: Test Cases
Parameters:
summary (string) required: Test case summary/title
description (string): Test case description
folderId (number): Folder ID to place the test case in
priority (string): Priority name (e.g., 'High', 'Medium', 'Low'). Auto-resolved to ID.
status (string): Status name (e.g., 'To Do', 'In Progress', 'Done'). Auto-resolved to ID.
assignee (string): Assignee account ID
reporter (string): Reporter account ID
components (array): List of component names (e.g., ['UI', 'Cloud']). Auto-resolved to IDs.
labels (array): List of label names (e.g., ['Release_1', 'Sprint 1']). Auto-resolved to IDs.
steps (array): List of test steps
Output Description: JSON object with test case ID, key, version number, and summary. Warnings included if any fields were skipped.
Use Cases: 1. Create a basic test case with just a summary 2. Create a test case with priority and status using names from set_project_context response 3. Create a test case with labels and components by exact name 4. Add detailed test steps with step descriptions, test data, and expected results 5. Create a test case in a specific folder using folderId 6. Set assignee and reporter using Jira account IDs 7. Create test cases for manual testing with step-by-step instructions 8. Create test cases with all metadata fields for comprehensive test management
Examples:
Create a simple test case (project must be set via set_project_context first)
{
"summary": "Search Functionality"
}Expected Output: Test case created with key 'SCRUM-TC-xxx'
Create a test case with priority and status
{
"summary": "Search Functionality",
"description": "Verify search functionality works correctly",
"priority": "High",
"status": "To Do"
}Expected Output: Test case created with resolved priority and status IDs
Create a test case with labels, components, and steps
{
"summary": "Search Functionality",
"description": "Search Functionality Test",
"priority": "High",
"status": "To Do",
"labels": [
"Release_1",
"Sprint 1"
],
"components": [
"UI",
"Cloud"
],
"steps": [
{
"stepDetails": "Enter a keyword in the search box",
"testData": "Keyword = \"Test\"",
"expectedResult": "The keyword should be visible in the search box"
},
{
"stepDetails": "Click on the Search button",
"testData": "Click on Search Button",
"expectedResult": "Search results matching the keyword should be displayed"
},
{
"stepDetails": "Verify the search results",
"testData": "Expected results list",
"expectedResult": "Results should be relevant to the entered keyword"
}
]
}Expected Output: Test case created with resolved labels/components/priority/status and 3 steps
Hints: 1. PREREQUISITE: set_project_context must be called before this tool. NEVER auto-select a project. 2. Priority and status values were returned by set_project_context. Use NLP to map user input (e.g., 'Major' → 'High', 'Critical' → 'Blocker'). 3. If priority or status name is not found, the operation proceeds without that field and a warning is returned. 4. Labels and components are resolved on demand. If a name is not found, it is skipped with a warning. 5. Steps: ALWAYS include all three fields — stepDetails, testData, and expectedResult. Generate reasonable values if not provided. 6. folderId is optional. assignee and reporter accept Jira account IDs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | No | List of test steps | |
| labels | No | List of label names (e.g., ['Release_1', 'Sprint 1']). Auto-resolved to IDs. | |
| status | No | Status name (e.g., 'To Do', 'In Progress', 'Done'). Auto-resolved to ID. | |
| summary | Yes | Test case summary/title | |
| assignee | No | Assignee account ID | |
| folderId | No | Folder ID to place the test case in | |
| priority | No | Priority name (e.g., 'High', 'Medium', 'Low'). Auto-resolved to ID. | |
| reporter | No | Reporter account ID | |
| components | No | List of component names (e.g., ['UI', 'Cloud']). Auto-resolved to IDs. | |
| description | No | Test case description |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique test case ID | |
| key | Yes | Test case key (e.g., 'SCRUM-TC-190') | |
| summary | Yes | Test case summary | |
| versionNo | Yes | Version number |