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

Testrail using api in Python with selenium


#1

Im currently using selenium with python along with the testrail api, so when my tests pass or fail my test run in testrail is updated. However i want to be able to enter the version number into the version section of the text? I cant find any information on how to do this in the testrail api section?


#2

Hi there,

Thanks for the post! When adding test results via the API you can include the ‘version’ request field to add your information into that result field alongside the status IDs, comments, or any other information you are passing with your tests. With Python binding, the add result formatting would look something like this:

{ 'status_id': 1, 'version': 'v.X.X', 'comment': 'This test worked fine!' }

You can find information about the supported fields for the API methods used to add results on the page here:

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

If you have any further questions feel free to contact our support team at contact@gurock.com.