set_test_script
Replace a test case's entire script or switch between step-by-step, plain text, and BDD formats. Replaces the existing script; format changes delete all previous steps.
Instructions
Replace a test case's ENTIRE script or change its format (PUT /testcase/{testCaseKey} with a full testScript). WARNING — destructive: switching a STEP_BY_STEP script to PLAIN_TEXT or BDD irreversibly deletes all existing steps, and a STEP_BY_STEP replacement deletes every existing step omitted from the list. Pass text for PLAIN_TEXT/BDD (for BDD only Gherkin step lines Given/When/Then/And/But, stored verbatim — no 'Feature:'/'Scenario:' headers, the API rejects them); pass steps for STEP_BY_STEP. Returns { key, url }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Script body — required for PLAIN_TEXT and BDD (Gherkin step lines only, no Feature:/Scenario: headers), not allowed for STEP_BY_STEP | |
| type | Yes | New script format | |
| steps | No | Complete final list of steps — required for STEP_BY_STEP, not allowed otherwise. Existing steps omitted here are deleted; keep their ids (from get_test_case) to update them in place. | |
| testCaseKey | Yes | Test case key, e.g. PROJ-T123 |