add_case
Create new test cases in TestRail by specifying title, section, type, priority, and custom fields to organize testing requirements systematically.
Instructions
Create a new TestRail test case in a specific section. IMPORTANT: Before creating a case, gather required information using get_projects, get_suites, get_sections, and get_case_fields tools to ensure proper section_id, type_id, and custom field values. Or ask the user to provide the information if not provided.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Test case title - should be descriptive and unique within the section | |
| section_id | Yes | Section ID where the case will be created. REQUIRED: Use get_sections tool first to find valid section IDs for your project/suite. Different projects have different section structures. | |
| type_id | No | Test case type ID (e.g., 1=Acceptance, 2=Accessibility, 3=Automated, 4=Compatibility, 5=Destructive, 6=Functional, 7=Other, 8=Performance, 9=Regression, 10=Security, 11=Smoke & Sanity, 12=Usability). RECOMMENDED: Use get_cases tool to see what type_id values are used in existing cases in your target section. | |
| priority_id | No | Priority ID (1=Low, 2=Medium, 3=High, 4=Critical). RECOMMENDED: Use get_cases tool to see what priority_id values are used in existing cases. | |
| refs | No | References (e.g., requirement IDs, JIRA tickets, user story numbers). Can be comma-separated for multiple references. | |
| custom | No | Custom fields (key-value pairs). REQUIRED: Use get_case_fields tool first to discover available custom fields and their valid values. Common fields include: custom_automation_type (1=None, 2=Playwright, 3=ChatGPT, 4=Non-Automated, 5=Partial), custom_environment (1=UAT Only, 2=UAT/Prod, 3=Demo UAT, 4=Live UAT), custom_preconds (preconditions text), custom_steps (test steps text), custom_expected (expected results text). Some custom fields are required by the project configuration. |
Input Schema (JSON Schema)
{
"properties": {
"custom": {
"additionalProperties": {},
"description": "Custom fields (key-value pairs). REQUIRED: Use get_case_fields tool first to discover available custom fields and their valid values. Common fields include: custom_automation_type (1=None, 2=Playwright, 3=ChatGPT, 4=Non-Automated, 5=Partial), custom_environment (1=UAT Only, 2=UAT/Prod, 3=Demo UAT, 4=Live UAT), custom_preconds (preconditions text), custom_steps (test steps text), custom_expected (expected results text). Some custom fields are required by the project configuration.",
"type": "object"
},
"priority_id": {
"description": "Priority ID (1=Low, 2=Medium, 3=High, 4=Critical). RECOMMENDED: Use get_cases tool to see what priority_id values are used in existing cases.",
"exclusiveMinimum": 0,
"type": "integer"
},
"refs": {
"description": "References (e.g., requirement IDs, JIRA tickets, user story numbers). Can be comma-separated for multiple references.",
"type": [
"string",
"null"
]
},
"section_id": {
"description": "Section ID where the case will be created. REQUIRED: Use get_sections tool first to find valid section IDs for your project/suite. Different projects have different section structures.",
"exclusiveMinimum": 0,
"type": "integer"
},
"title": {
"description": "Test case title - should be descriptive and unique within the section",
"minLength": 1,
"type": "string"
},
"type_id": {
"description": "Test case type ID (e.g., 1=Acceptance, 2=Accessibility, 3=Automated, 4=Compatibility, 5=Destructive, 6=Functional, 7=Other, 8=Performance, 9=Regression, 10=Security, 11=Smoke & Sanity, 12=Usability). RECOMMENDED: Use get_cases tool to see what type_id values are used in existing cases in your target section.",
"exclusiveMinimum": 0,
"type": "integer"
}
},
"required": [
"title",
"section_id"
],
"type": "object"
}