POST - create test script: step by step issue
Hello,
I am using Zephyr Scale Cloud and encountering an issue when editing test steps.
I am successfully able to:
Create a new test case using POST /v2/testcases with the following JSON:
{
"projectKey": "DZIA",
"name": "Login Test"
}
Edit steps for plain text scripts using:
POST /v2/testcases/DZIA-T176/testscript
{
"type": "plain",
"text": "e.g. Attempt to login to the application"
}
However, I am unable to update test steps one by one (step-by-step) as described in the documentation.
The documentation states: To define your own test steps, use the POST /testcases/{testCaseKey}/teststeps endpoint after creation using OVERWRITE mode AND For Plain Text scripts, we support HTML fragments. To create a step-by-step test script, you should use the POST /testcases/{testCaseKey}/teststeps endpoint.
POST /v2/testcases/{testCaseKey}/teststeps?mode=OVERWRITE
with a JSON body:
[
{
"description": "Your step description",
"expectedResult": "What you expect after the step"
},
{
"description": "Next step description",
"expectedResult": "Next expected result"
}
]
…but this request does not work.
Response:
{
"errorCode": 400,
"message": "Invalid Payload"
}
Questions:
Is the provided JSON structure correct for importing step-by-step instructions?
Could you provide an explicit example (expected JSON payload) for step-by-step test steps?
Thank you guys!