You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -132,14 +132,21 @@ Updates the top-level fields of a test case. Test case steps are not managed thr
132
132
-`product_id` (number, required) - ID of the Product
133
133
-`test_case_id` (number, required) - ID of the Test Case
134
134
135
-
All attributes must be provided inside the root object `test_case`. All fields are optional — only the fields you provide are updated.
135
+
All attributes must be provided inside the root object `test_case`. All fields are optional — only the fields you provide are updated.`feature_id` is not accepted by this endpoint.
136
136
137
137
**Request Body:**
138
138
139
139
-`title` (string, optional) - Title of the test case
140
140
-`requirements` (string, optional) - Requirements of the test case
141
141
-`target_idx` (string, optional) - Reference of the test case in other system
142
-
-`feature_id` (number, optional) - ID of the Feature to move the test case to. Must belong to the same product.
142
+
-`test_case_steps` (array[Step], optional) - Array of step objects to create, update, or remove
143
+
144
+
**Step Object:**
145
+
146
+
-`id` (number, optional) - ID of an existing step to update or remove. Omit to add a new step.
147
+
-`description` (string, optional) - Description of the step
148
+
-`target_idx` (string, optional) - Reference of the test case step in other system
149
+
-`_destroy` (boolean, optional) - Set to `true` to remove the step identified by `id`
143
150
144
151
**Example Request:**
145
152
@@ -151,7 +158,12 @@ curl -X PUT "https://api.test.io/customer/v2/products/1/test_cases/123" \
151
158
-H "Content-Type: application/json" \
152
159
-d '{
153
160
"test_case": {
154
-
"title": "Login Test (updated)"
161
+
"title": "Login Test (updated)",
162
+
"test_case_steps": [
163
+
{ "id": 456, "description": "Navigate to login page (updated)" },
164
+
{ "description": "Confirm dashboard is shown" },
165
+
{ "id": 789, "_destroy": true }
166
+
]
155
167
}
156
168
}'
157
169
```
@@ -162,6 +174,10 @@ curl -X PUT "https://api.test.io/customer/v2/products/1/test_cases/123" \
162
174
163
175
Returns the updated test case object. See the response shape in [Create a bulk of test cases](#create-a-bulk-of-test-cases) above.
164
176
177
+
{% callout type="note" %}
178
+
If the test case is already in use by a test cycle, its steps are not edited in place — a hidden shadow copy of the test case is created (or reused) and the step changes are applied there instead, so historical test results tied to the original steps remain intact. In that case the response is the shadow copy: it has a different `id` from the one in the request URL, and subsequent requests should use that new `id`. The original `test_case_id` will then return `404` from [Get test case](#get-test-case), same as a deleted-but-in-use test case.
0 commit comments