Not able to add teststep
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not able to add teststep
Hi ,
I am not able to add multiple teststeps using the REST endpoint
/testresult
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any update on my query would be much appreciated ? Is there any known limitation here ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I've not used the API but I think the update you're making is to the execution of a Test Cycle (which is a Test Run in the API). I think what you're trying to do is update test results for executed Test Cases and I think this is the API you need:
/testrun/{testRunKey}/testcase/{testCaseKey}/testresult
"Creates a new Test Result on the specified Test Run, looking for an item that matches the testCaseKey..."
Good luck!
Andy
------------------------------------------
Please give kudos if I have helped or accept as solution if appropriate
Feel free to connect with me on LinkedIn: https://www.linkedin.com/in/andrew-barbet-548a234/
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the answer but my problem is that only index 0 is updated in the final results . index 1 is siliently ignored . I also tried the endpoint suggested by you .
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Looking at your original block of code, I'm wondering if you need to include some/all of the block of code I've highlighted red below for each index in your code. My guess is that there are some mandatory fields that need to be included, like "testCaseKey". If you've tried that already, there is the SmartBear support team - they'll come back to you with an answer I'm sure.
------------------------------------------
Please give kudos if I have helped or accept as solution if appropriate
Feel free to connect with me on LinkedIn: https://www.linkedin.com/in/andrew-barbet-548a234/
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
Please keep on update if you solve this problem, because I have similar issue and trying to find solution, will be thankful to you.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Andy , of course I am adding the mandatory fields . I have updated my message to avoid any confusion there
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,,
Just checking if we're talking about the same thing because I can't see that your message has been updated. I wondered if an approach like this would work, where you repeat the fields for each index. If this doesn't work then I'm out of ideas and recommend you raise a request with the support team. Good luck with your issue!
Andy
[
{
"status": "Pass",
"testCaseKey": "TTT-T84",
"comment": "The test has failed on some automation tool procedure.",
"executionTime": 180000,
"executedBy": "tomation01",
"assignedTo": "tomation01",
"actualStartDate": "2016-02-14T19:22:00-0300",
"actualEndDate": "2016-02-15T19:22:00-0300",
"scriptResults":
[
{
"index": 0,
"status": "Pass",
"comment": "This step has pass."
}
],
"status": "Pass",
"testCaseKey": "TTT-T84",
"comment": "The test has failed on some automation tool procedure.",
"executionTime": 180000,
"executedBy": "tomation01",
"assignedTo": "tomation01",
"actualStartDate": "2016-02-14T19:22:00-0300",
"actualEndDate": "2016-02-15T19:22:00-0300",
"scriptResults":
[
{
"index": 1,
"status": "Pass",
"comment": "This step has failed."
}
],
etc.
]
------------------------------------------
Please give kudos if I have helped or accept as solution if appropriate
Feel free to connect with me on LinkedIn: https://www.linkedin.com/in/andrew-barbet-548a234/
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am afraid but this approach also does not help . Its ends up adding no steps in the final results and add 2 runs for the same testcase .
So , to summarise I am using the endpoint /testrun/{testRunKey}/testresults and want to have each entry under the "scriptResults" section shown in final results but only index 0 is updated . This means that I can only upload result of one test step to the final status. The JSON body in the original query as per the API documentation (https://support.smartbear.com/zephyr-scale-server/api-docs/v1/) .
This seems to be defect according to me as I am not able to upload the complete results to Zephyr unless I am doing something wrong here .
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am sorry to say that's me out of ideas. I can't see anything wrong with what you're doing. I've added a link below to the SmartBear support team who should be able to answer this for you. If you find a solution maybe post it here too so we can share in your findings 🙂
Login - Jira Service Management (atlassian.net)
Good luck!
------------------------------------------
Please give kudos if I have helped or accept as solution if appropriate
Feel free to connect with me on LinkedIn: https://www.linkedin.com/in/andrew-barbet-548a234/
