add_test_steps
Insert new steps into a STEP_BY_STEP test case at a chosen position, preserving all existing steps and their IDs. Merges new steps without deletion, supporting append, prepend, or custom index.
Instructions
Add steps to a STEP_BY_STEP test case without losing the existing ones. Composite operation: reads the test case, merges the new steps at the requested position while preserving existing step ids (so nothing is deleted), and writes the full list back. position: 'append' (default) adds after the last step, 'prepend' before the first, an integer inserts at that 0-based index (clamped to the current length). Only valid when the current script is STEP_BY_STEP or the test case has no script yet (a step-by-step script is then created); for a PLAIN_TEXT or BDD script use set_test_script instead. Returns { key, totalSteps }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | Yes | New steps to insert, in order (no ids). A step carrying testCaseKey is a "Call to Test". | |
| position | No | 'append' (default), 'prepend', or a 0-based insertion index into the existing steps (clamped to the list length) | |
| testCaseKey | Yes | Test case key, e.g. PROJ-T123 |