Forum Discussion
9 Replies
- MisterB
Champion Level 3
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
- dsajuOccasional Contributor
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 .
[{"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."},{"index": 1,"status": "Pass","comment": "This step has failed."},{"index": 2,"status": "Pass","comment": "This step has failed."}]}]- MisterB
Champion Level 3
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.
[{"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."},{"index": 1,"status": "Pass","comment": "This step has failed."},{"index": 2,"status": "Pass","comment": "This step has failed."}]}]Best, Andy