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

How are you managing run of automated tests and results through api


Hey Guys, Looking for some direction, we actively are planning to use testrail. I do understand its not pretty easy to run test caes through test rail and which is perhaps the intention.
I am able to use the testrail api’s to update test results and so on. But I need to give my team a process guideline which is easy to use. I have bunch of automation test cases and integration of testrail api to update test results. I am also planning to run my test cases through Jenkins. Any examples how you guys have implemented test automation with jenkins and test rail.My Org is looking for following use cases:

  1. Create test Cases in Testrail and associate it with relevant Jira items - ( This is done).
  2. Have a Maven Project for Testing/QA
  3. Use modules of Maven to create test code for different functional areas
  4. Users can then come and select test cases they want to run through Jenkins.
  5. Jenkins update the test results .

Any references, ideas?



Hello Bhaskar,

Thanks for your posting! The usual approach is to add test cases in TestRail for your automated tests and then map the TestRail case IDs (C###) to your automated tests (e.g. via code attributes or other means). You can then easily add results for your automated tests via TestRail’s API by creating test runs/plans (add_run/add_plan) and then using add_result_for_case or add_results_for_cases:

The results would usually be uploaded/pushed to TestRail outside/independently of TestRail (e.g. after your Jenkins job by a tool that post-processes the results file) and this is the most flexible option in our experience.

Would this work for you?



Thanks for the reply. I am able to test testrail api’s perfectly. But i have two questions:
Is there a script available to run the post processing of results of jenkins job?


Hello Bhaskar,

Yes, there are or were ready to use integration scripts for Jenkins built by customers and you can find an overview here:

I hope this helps!