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

C# API Test Case Result


#1

Does anyone here know how to add a test case result via C# or .net through an API call?


#2

Hello,

Thanks for your posting. I believe we’ve already answered this via email, but please see below if this is not the case:


We don’t currently have a full API usage example for C#/.NET, but TestRail’s API is a standard HTTP-based API and you would usually just need to create an instance of the HttpWebRequest class and add the headers/data as explained on the following page:

http://stackoverflow.com/questions/4015324/http-request-with-post

Two things that are unique to TestRail’s API are that the Accept header must be set to “application/json” and you must include the API key in the URL as GET parameter. This is also explained in our API documentation:

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

So it would usually just take a couple of C# lines to submit an API request. If you have issues with this please let me know and we might be able to provide more assistance.

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

Regards,
Tobias