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

Retrieve value of a custom field for a specific test using mini API


#1

Hi,

I would like to retrieve the value of a custom field from the last time a test was run to compare against the results of the current test run (we are intending on storing a performance test result in the custom field, and then automatically comparing it to see if there has been any significant degradation).

I can work out the ID for the test that I need to compare the data with, and I was hoping that

                            index.php?/miniapi/get_test/<test_id>

would give me the value of the custom field, but it isn’t in the data returned from this call. I noticed that the comments and the defect list fields also aren’t provided, and it would be good to be able to see these too.

Is there any way to get this information via HTTP?


#2

Hello Sharon,

Thanks for your posting. Yes, there’s a way read this via the API and this can be done with the get_results API method:

Also included in the response are the comments, defects etc. for the test results. Please note that this method is fairly new so you would probably need to update your current API module to the current version first:

http://docs.gurock.com/testrail-api/installation

(you would need to pick the 2.7 edition)

I hope this helps and please let me know in case you have any further questions!

Regards,
Tobias


#3

Hi,

Thanks for that it does exactly what I needed.:smiley:

Regards

Sharon