How to integrate Testrail test cases into automation script?

My goal is to run the test cases on Testrail automatically with the python script and write results back to Testrail.
I know I can use API to interact with Testrail. However, I have no idea how to read the test case and let the script understand the steps.
For example, I have a test case below:
1.Open Chrome browser
2.Enter a malicious web site:
3.The web site is blocked

Are there ways that my script can use to recognize and parse the steps?


1 Like

Interesting idea but I don’t think that will be easy to implement because (as far as I am aware) test rail provides no ability to parse test cases and you would need to build that yourself. You are essentially talking about building a keyword driven framework which, speaking from experience, is no easy task.
What test rail does allow however is for you to trigger your existing automation framework on from the UI provided it is available from some build server like Jenkins or Bamboo. The facility is

I actually recently attended a great webinar about this topics which is available to view here The testrail team went into great details on how to trigger tests from testrail and send results back to testrail.

If you are determined to go with your original idea writing Cucumber tests is likely going to your best approach but will take some setting up

1 Like