addCase
Create new test cases in TestRail by specifying section, title, steps, and custom fields to organize testing workflows.
Instructions
Creates a new test case in TestRail. REQUIRED: sectionId, title. OPTIONAL: typeId, priorityId, templateId, customSteps, customExpected, customStepsSeparated, customFields, etc. Use getCaseTypes to find valid typeId values. NOTE: templateId=2 is required to use customStepsSeparated (array of step objects with 'content' and 'expected' fields). For simple text steps, use customSteps and customExpected instead. Use customFields for any additional custom fields (e.g., {custom_case_security_score: 'high'}).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sectionId | Yes | TestRail Section ID | |
| title | Yes | Test case title | |
| typeId | No | Test case type ID | |
| priorityId | No | Test case priority ID | |
| estimate | No | Test case estimated time | |
| milestoneId | No | TestRail Milestone ID | |
| refs | No | Test case references | |
| templateId | No | Template ID (use 2 for custom_steps_separated support) | |
| customPrerequisites | No | Prerequisites | |
| customSteps | No | Test case steps | |
| customExpected | No | Expected results | |
| customStepsSeparated | No | Separated test steps array (requires template_id=2) | |
| customFields | No | Additional custom fields as key-value pairs (e.g., {custom_case_security_score: 'high'}) |