Integrate with Bugzilla

This topic explains how to integrate TestRail with Bugzilla. There are currently three ways to integrate TestRail with Bugzilla, namely:

  • Using defect URLs to link test results to Bugzilla
  • Using the defect plugin for Bugzilla to push and look up Bugzilla cases
  • Using reference URLs to link test cases to Bugzilla
  • Using the reference plugin for Bitbucket to look up Bitbucket issues in the References field of TestRail entities such as test cases, test runs, and milestones

You don’t have to use all the listed integration options, and you can mix and match the integration with other tools. Configuring the integration usually only takes a few minutes. This guide explains how to configure the integration and how it works.

Defect URLs

The defect URLs are used to let TestRail know how to convert a Defect ID into a URL for your Bugzilla instance. There are two types of URLs: View URLs and Add URLs.

The Defect View URL is used to build a link to Bugzilla based on the Defect ID, so you can simply click on an ID to open the issue directly in Bugzilla.

The Defect Add URL is used to create a link to the issue creation screen inside Bugzilla. Once the URL is configured, a new Add link appears next to the Defects field in the Add Test Result dialog and the ‘Defects’ menu in TestRail’s Push Defect From Anywhere feature. This link allows you to jump to Bugzilla’s New Issue form to report a new bug.

If you see the ‘Add’ link, you can copy the ID of your new Bugzilla issue and enter it into any Defects or References field inside TestRail.

You can configure Bugzilla’s URLs in TestRail globally under Administration > Integration or on a per-project basis within any project’s settings. Use the following example URLs to configure the addresses:

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

Please make sure to replace <your-server> with the actual address of the Bugzilla you want to integrate with.

If you have the defect plugin configured, you’ll also be able to hover over the defect ID to view the issue details directly from within TestRail.

Reference URLs

The reference URLs are implemented in a very similar manner to Defect URLs described above. The primary difference is Reference URLs are used for the ‘References’ field on various TestRail entities (instead of the Defects field).

The Reference View URL is configured in the same manner as described above and allows TestRail to create a direct link to a Bugzilla based on an ID entered into a References field.

The Reference  Add URL is also configured in the same way as the Defect Add URL. Once configured, an ‘Add’ link will appear next to each References field in your instance or project. If you use the ‘Add’ link, you can copy the ID of your new Bugzilla issue and enter it into any Defects or References field inside TestRail.

If you have the Reference plugin configured, you’ll also be able to hover over a Reference ID to view the issue details directly from within TestRail. Keep reading to learn how to use and configure the Defect and Reference Plugins.

Defect plugin

Defect plugins can be used to implement a deeper bug tracker integration and TestRail comes with a ready-to-use Bugzilla defect plugin. To configure the defect plugin, select Administration > Integration and select Bugzilla in the Defect Plugin drop-down list. The next step is to configure all the necessary connection settings in the [connection] category. You can also configure the integration for a specific project by editing a project’s settings.

The Defect Plugin utilizes Bugzilla’s API, so valid credentials are needed to connect to the API. You can enter a single set of credentials here for all Bugzilla users. or you can insert User Variables to allow each TestRail user to configure their own credentials. These credentials may be a combination of an email address or username with a password or API key.


We strongly recommend configuring User Variables. You can learn more about configuring these in our User Variables documentation.

With the Defect Plugin configured, the option to push a new defect will appear in the Defect from Anywhere menu, as well as in the Add Result dialog within a test run. This dialog allows you to create a new issue in Bugzilla without leaving TestRail.

Once the test result is added, hovering the mouse cursor over a case ID will open a window with useful information and status details about the case in Bugzilla.



Customization features are only available with the ‘Bugzilla_REST’ plugin, available with TestRail 6.5 or later.

The Bugzilla defect plugin was built to work with a standard Bugzilla configuration. TestRail allows you to customize the fields which appear when hovering over Defect IDs. Preconfigured hover fields can be set to ‘on’ or ‘off’ in their respective [hover.fields] section, or change the order in which they appear by the fields in each section.

Please keep in mind some fields (such as the title field) are always enabled and may not appear in these sections due to always beings required by either TestRail or Bugzilla.

The Bugzilla Defect Plugin also supports modifying field properties as well as custom fields.

In addition to enabling, disabling, or re-organizing fields as described above, it’s also possible to change additional options per field. To do this, you would define a section for the field, such as [hover.field.description], and specify additional options within this section.

label=Detailed Description

Please see below for a full list and explanation of the available field options:

Option Description
label Specifies the display name of the field in the Hover Defect dialogue (Required for custom fields)
size Specifies whether the field is displayed as a compact field (compact) or uses the full width of the dialogue (full)
remember Specifies if previously selected values for this field should be remembered and restored the next time the Hover Defect dialogue is opened
required Specifies if this field is mandatory or optional and whether users are required to enter a value for this field in the Hover Defect dialogue
type Specifies the type of this field, please see section Custom fields below for a list of supported field types (Required for custom fields)

Custom fields

You can also use the above-mentioned approach to add custom fields to TestRail’s Push Defect dialogue. To do this, simply add a line with your custom field to the [hover.fields] section to add a field. Custom fields are designated by <custom_field_name>.

# ...


The name of a custom field will always begin with ‘cf_’.

Then, add a [field.settings.<custom_field_name>] section. This section is required so the plugin can push and/or retrieve data from your tool. The following is an example:


The following field types are supported:

Field Type Description
dropdown A dropdown list that allows users to select one of the multiple options
multiselect Allows users to select multiple, pre-defined options
string A small free-text field for up to 250 characters
text A large free-text field without practical size limitations

Reference Plugin

Reference plugins can be used to retrieve additional information from IDs entered into the References field of TestRail entities, such as test cases, test runs, and milestones. The Reference Plugin is configured on the References tab of the integration settings, in the same manner, the Defect Plugin is configured.

The plugin supports hovering over Reference IDs but does not support a Push dialog for the References field. It is also possible to customize the fields which appear via link hovering and add custom fields, as described above.

If you have the Defect Plugin already configured for Bugzilla, you can simply copy your [connection] and [hover.fields] sections from the Defect Plugin into the Reference plugin configuration. Alternatively, you can choose different fields to be displayed for References and Defects.

Additional Customizations

TestRail also supports custom defect plugins. If your team uses TestRail Server, it is possible to further customize the defect plugin (or build your own) to support additional field types or other data. For additional information, please see our documentation about Custom plugins.

Was this article helpful?
0 out of 0 found this helpful