Defects: Defect URLs

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.

Examples

Please see below for sample web addresses for popular bug trackers and project management tools. If you use one of the listed tools, you can just copy & paste the listed web addresses and replace the server name (and possibly url path) with your own installation. Please note: some bug trackers are supported with additional integration mechanisms, please see the overview page.

BugTracker.NET installation
Defect View Url: http://your-server/btnet/edit_bug.aspx?id=%id%
Defect Add Url:  http://your-server/btnet/edit_bug.aspx

Bugzilla installation
Defect View Url: http://your-server/bugzilla/show_bug.cgi?id=%id%
Defect Add Url:  http://your-server/bugzilla/enter_bug.cgi

Fixx installation
Defect View Url: http://your-server/issues/%id% 
Defect Add Url:  http://your-server/issues/new/

FogBugz installation
Defect View Url: http://your-server/fogbugz/default.asp?%id%
Defect Add Url:  http://your-server/fogbugz/default.asp?command=new&pg=pgEditBug

FogBugz on demand
Defect View Url: http://your-name.fogbugz.com/default.asp?%id%
Defect Add Url:  http://your-name.fogbugz.com/default.asp?command=new&pg=pgEditBug

Gemini installation
Defect View Url: http://your-server/issue/ViewIssue.aspx?id=%id%
Defect Add Url:  http://your-server/issue/Issue.aspx

Gemini on demand
Defect View Url: http://your-name.countersoft.net/issue/ViewIssue.aspx?id=%id%
Defect Add Url:  http://your-name.countersoft.net/issue/Issue.aspx

Jira installation
Defect View Url: http://your-server/jira/browse/%id%
Defect Add Url:  http://your-server/jira/CreateIssue!default.jspa

Lighthouse Hosted
Defect View Url: http://name.lighthouseapp.com/projects/<projectid>/tickets/%id%
Defect Add Url:  http://name.lighthouseapp.com/projects/<projectid>/tickets/new

Mantis installation
Defect View Url: http://your-server/mantis/view.php?id=%id%
Defect Add Url:  http://your-server/mantis/bug_report_advanced_page.php

OnTime installation
Defect View Url: http://your-server/defects/viewdefect.aspx?defectid=%id%
Defect Add Url:  http://your-server/defects/addeditdefect.aspx

Redmine installation
Defect View Url: http://your-server/issues/%id%
Defect Add Url:  http://your-server/projects/<projectid>/issues/new

Trac installation
Defect View Url: http://your-server/trac/ticket/%id%
Defect Add Url:  http://your-server/trac/newticket

Vault/Fortress installation
Defect View Url: http://server/Vault/ShowItem.aspx?pid=<projectid>&itemid=%id%
Defect Add Url:  http://server/Vault/AddItem.aspx?pid=<projectid>

YouTrack installation
Defect View Url: http://your-server/issue/%id%
Defect Add Url:  http://your-server/issues#newissue=yes

Supported placeholders

You can use different placeholders for the defect URLs to send additional information to your bug trackers. Please see below for the supported placeholders.

Add URL:

  • %project_id% - The ID of the current project
  • %project_name% - The name of the current project
  • %run_id% - The associated test run ID
  • %run_name% - The associated test run name
  • %run_config% - The configuration of this test run, if any
  • %test_id% - The ID of the test
  • %test_title% - The title of the test
  • %case_id% - The ID of the related test case
  • %case_title% - The tile of the related test case

View URL:

  • %id% - The ID of the defect/bug