Defect URLs are an easy and universal way to link TestRail to bug trackers and project management tools. Once the defect URLs have been configured, TestRail allows you to jump to your bug tracker’s New Bug page to enter new bug reports. Entered defect IDs are also automatically linked to your bug tracker to make it easy to track and follow the status of reported issues.
Configuring the integration
The URL integration with bug trackers and other external tools can be configured globally or on a per-project basis. You can also specify a global bug tracker and override it for just a few specific projects. To configure a global bug tracker, select Administration > Site Settings > Integration and enter the web addresses of your bug tracker.
Defect View URL
This is the web address of your bug tracker to view a case. Use
%id% as the placeholder for the case ID. E.g., if a bug is accessed with the address http://server/view.html?1234, enter http://server/view.html?%id% here.
Defect Add URL
This is the web address of your bug tracker to add a case. You can usually just enter the address of your bug tracker’s add form here.
To configure a bug tracker for a specific project, edit the project and enter the web addresses of your bug tracker on the Integration tab.
How it works
Once the defect 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 quickly jump to your bug trackers New Bug form to report a new bug. Additionally, entered issue IDs are linked to your bug tracker instance to make it easier to track the status of your issues.
Please see below for links to sample URLs for popular bug trackers and project management tools. If you use one of the listed tools, you can just copy & paste the sample URLs and the following documentation will also list any other integration mechanisms we support for these tools.
Defect from Anywhere
For any project which uses a Defect Plugin and/or Defect URL, users can connect to the integrated external tool using the ‘Defects’ button available on the following TestRail views:
- The project Overview page
- The project Milestones page
- The project’s Test Runs and Results pages (including from a test run or test plan)
- The Test Cases page
Push New Defect
This option in the Defects menu is used to open the Push dialog for submitting a new defect to your external tool, without leaving TestRail. This feature requires a Defect Plugin to be configured for your TestRail instance, or the current project. The guide for configuring defect integrations can be found here.
When you successfully submit a new defect to the external tool using this dialog, TestRail will provide you with the new entity ID so you can then enter this ID into the Defects or References fields of any associated TestRail entities.
Add New Defect
This option in the Defects menu is used to open the defect creation screen in your external tool. This feature requires a Defect Add URL to be configured for your TestRail instance, or the current project. The guide for configuring Defect URLs can be found here.
When using the Add New Defect option, TestRail will not automatically capture the ID of the new entity you create. If you would like to add this ID to the Defects or References field of a TestRail entity, you will need to copy the ID from your external tool in order to add it to your TestRail entities.