Zephyr: Create Test Case Steps
zephyr_create_test_case_stepsAdd or replace test case steps in Zephyr with inline instructions or delegation to another test case.
Instructions
Create steps for a Test Case in Zephyr. Supports inline step definitions or delegating execution to another test case (also known as 'call to test' via UI). Requires a mode: APPEND adds steps to the end of the existing list, OVERWRITE deletes all existing steps and replaces them with the provided ones. Always ask the user to choose between OVERWRITE or APPEND before calling this tool.
Toolset: Test Cases
Examples:
To the Test Case SA-T1, add steps that will test a login page.
{
"testCaseKey": "SA-T1",
"mode": "APPEND",
"items": [
{
"inline": {
"description": "Navigate to the login page",
"expectedResult": "Login page is displayed"
}
},
{
"inline": {
"description": "Enter valid credentials and click Submit",
"expectedResult": "User is redirected to the dashboard"
}
}
]
}Expected Output: The ID of the Test Steps resource and the API self URL to fetch it
To the Test Case MM2-T15, replace all existing steps with new ones that test the settings page for an Admin user.
{
"testCaseKey": "MM2-T15",
"mode": "OVERWRITE",
"items": [
{
"inline": {
"description": "Open the settings page",
"testData": "User role: Admin",
"expectedResult": "Settings page is accessible"
}
},
{
"inline": {
"description": "Change the notification preference",
"testData": "Preference: Email only",
"expectedResult": "Notification preference is updated successfully"
}
}
]
}Expected Output: The ID of the Test Steps resource and the API self URL to fetch it
To the Test Case SA-T1, add a step that reuses the steps from the Test Case PRJ-T42
{
"testCaseKey": "SA-T1",
"mode": "APPEND",
"items": [
{
"testCase": {
"testCaseKey": "PRJ-T42"
}
}
]
}Expected Output: The ID of the Test Steps resource and the API self URL to fetch it
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Valid values: `"APPEND"`, `"OVERWRITE"`. <br> `OVERWRITE` deletes and recreates the test steps and associated custom field values using the provided input. Attachments for existing steps are kept, but those for missing steps are deleted permanently <br> `APPEND` only adds extra steps to your test steps. | |
| items | Yes | The list of test steps. Each step should be an object containing `inline` or `testCase`. **They should only include one of these fields at a time**. | |
| testCaseKey | Yes | The key of the test case. Test case keys are of the format [A-Z]+-T[0-9]+ |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The ID of the entity | |
| self | No |