This topic explains how to integrate TestRail with Redmine. There are currently three ways to integrate TestRail with Redmine, namely:
- Using defect URLs to link test results to Redmine
- Using the defect plugin for Redmine to push and look up Redmine issues
- Using reference URLs to link test cases to Redmine
You don't have to use all listed integration options and you can mix and match the integration with other tools. Configuring the integration usually only takes a few minutes and this guide explains how to configure the integration and how it works.
The defect URLs are used to let TestRail know how to access your Redmine instance. Once the URLs have been configured, a new Add link appears next to the Defects field in the Add Test Result dialog. This link allows you to jump to Redmine's New Issue form to report a new bug. Additionally, entered issue IDs are linked to your Redmine instance to make it easier to track the status of your issues.
To configure Redmine's URLs in TestRail, select Administration > Integration. You can alternatively enter separate bug tracker URLs for each project under Administration > Projects. Use the following example URLs to configure the addresses:
Redmine installation Defect View Url: http://your-server/issues/%id% Defect Add Url: http://your-server/projects/<projectid>/issues/new
Defect plugins can be used to implement a deeper bug tracker integration and TestRail comes with a ready-to-use Redmine defect plugin. To configure the defect plugin, select Administration > Integration and select Redmine in the Defect Plugin dropdown list. The next step is to configure all the necessary connection settings in the Configuration field. Project specific plugins and configuration settings can optionally be specified under Administration > Projects.
When the defect plugin has been configured, a new Push link is shown next to the Defects field in the Add Test Result dialog. Clicking the link will open a popup dialog that enables you to push a bug report to Redmine without leaving TestRail. Once the test result was added, hovering the mouse cursor over an issue ID will open a window with useful information and status details about the issue in Redmine.
Please note: you first need to activate the REST API in Redmine under Administration > Settings > Authentication > Enable REST web service to use the defect plugin integration.
If you are using a Redmine version below 1.3, then you need to enable the defect plugin's legacy mode and manually configure your project categories and trackers. The reason for this is that older Redmine versions didn't have any API methods to retrieve a list of categories and trackers, so you would need to configure these details in TestRail once (or simply upgrade Redmine). To do this, enable the legacy mode by adding the
legacy option to the
connection section in the defect plugin configuration box (under Administration > Integration):
[connection] .. mode=legacy
You will then need to add your trackers and project categories to the defect plugin configuration box as well, by adding the following sections:
; tracker_id=tracker_name [trackers] 1=Defect 2=Requirement 3=Support (etc...) ; project_id.category_id=category_name [categories] 1.1=User Interface 1.2=Backend 1.3=Documentation
Make sure to use the exact same format as specified above. For categories, you would need to specify the project ID and the category ID as the key for each entry.
The Redmine defect plugin was built to work with a standard Redmine configuration. TestRail allows you to customize the integration to work with your own custom fields or to map users between TestRail and Redmine. Please see the following articles for details on how to customize the integration:
The reference URLs are used to link test cases to issues stored in Redmine via the References field. Once the URLs have been configured, issue IDs entered in the References field are linked to your Redmine instance to make it easier to jump to related issues, feature specifications or requirements.
To configure Redmine's URLs for the References field, select Administration > Integration. You can alternatively enter separate reference URLs for each project under Administration > Projects. Use the following example URLs to integrate TestRail with Redmine:
Redmine installation Reference View Url: http://your-server/issues/%id% Reference Add Url: http://your-server/projects/<projectid>/issues/new