Robot Framework Integration with TestRail

Back to Blog
robot framework integration with TestRail

Robot Framework Integration with TestRail

What Is TestRail?

TestRail is a test case and test management programming device that can coordinate with Jira. In easy language, TestRail is the application used to compose the experiments in the proper arrangement. It’s the combination of sophisticated project management capabilities with features and is mostly used by the QA and Development teams to manage the functional, exploratory, and automated tests. TestRail tool plays a so crucial role to organize your QA department and track software testing efforts.

What are the benefits of  Robot Framework Integration with TestRail?

  1. Web-Based
  2. Integration with Jira
  3. Versatility
  4. User-Friendly
  5. Easy use of multiple testing Methods

3 Ways to Save Test Case Execution Results into the TestRail by Using

  a) Testrail Binding
  b) Testrail Listener
  c) Testrail API with the help of references

Here, In our blog, we are using a TestRail listener to do so.


  • Enable TestRail API for your project: Navigate to TestRail > Administration > Site Settings > API menu and enable API.
  • Install Robot Framework TestRail library using the below command
   pip install robot framework-testrail
  • Remove TestRail from the path in URLs
       <python folder path>/Lib/site-packages/         testrail_url

       <python folder path>Lib/site-packages/       self._url
  • Create a TestRun into TestRail by including all those tests which you want to run and save the results

Read Also :- Read PDF File Using Python in Robot Framework

Link Test Cases

To submit test results from Robot Framework Integration with TestRail, you need to link a test case from Robot Framework to the one in TestRail. In order to do that, Create a tag named restrained in each test case of the robot framework to store the related TestRail test case ID. This tag should store numbers only. For example, if you have a test case with ID C1929, the variable should be filled with 1929.

  So the tag will be testrailid=1929


*** Test Cases ***

Open Gmail

    [Tags]  testrailid=1929

    Open Browser chrome

    [Teardown]    Close Browser
Run Tests Using Listener
pybot --listener  robot_suite.robot

To read more blogs on ROBOT Framework from us here at Devstringx, then we have a lot to choose you.

Share this post

Back to Blog