Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Posting TestCase results to Test rail


#1

Hello,

Is there a way to POST the Elapsed time for run using RunID, I don’t see a field available in add_results_for_cases method in Test rail API . Kindly suggest a way to do that :slight_smile:


#2

In the API documentation the set of available system fields is listed in add_result. Those same fields can be used in the other add_result methods, like add_result_for_cases. So you would just need to put the time in the elapsed field of the JSON request.


#3

Hi Satish,

Thanks for your posting. Yes, you can simply use the ‘elapsed’ attribute in this case and this uses the same format as add_result/add_result_for_case as Don already mentioned (thank you!).

http://docs.gurock.com/testrail-api2/reference-results#add_result

Cheers,
Tobias


#4

Thanks Don. I will give a Try . :slight_smile:


#5

I will give a try and thanks for the quick response :slight_smile:


#6

Thanks, Satish, sounds good! Please let us know in case further questions come up, happy to help.

Cheers,
Tobias


#7

Hi,

I went through steps provied in “http://docs.gurock.com/testrail-api2/reference-results#add_result”, and I am trying to post result(‘pass’ or ‘fail’) to Testrail from Postman through the following link.

http://example.testrail.com/index.php?/api/v2/add_result/547&status_id=1&comment=pass&assignedto_id=1

but I am getting following error:
Response Body:
error:“One of Status ID, Assigned To or Comment is required”

Please let me know whether its the correct way of posting results. Please provide me some examples regarding posting Results to Testrail from Postman.

Thank you