Integration with Jira Data Center and Jira Server
Jira Data Center (previously known as Jira Server) is the self-hosted edition of the popular Jira issue tracker. This article describes how to configure the integration between a Jira Data Center instance and Allure TestOps.
- In a TestOps launch, test result or a defect, there will be clickable links to related Jira issues.
- In a Jira issue, there will be lists of related Allure TestOps launches or test results.
- Closing a Jira issue will cause a corresponding defect in Allure TestOps to close as well.
The lists on the Jira side are embedded into an issue details page as HTML iframes. For this to work, Allure TestOps does not have to be accessible from the Jira server, but it must be accessible from the user's device. This also means that the integration may be affected by the user's web browser settings, especially if the Jira Data Center instance uses HTTPS. If your users will report any problems anyway, please consult the Troubleshooting section or contact our support team.
For adding an issue to a test case manually, Jira must be accessible from the Allure TestOps server.
To use automatic linking between test cases and issues, a test author needs to define a relation using an Allure Report adapter for their test framework. Here's an example of such a definition:
import { test } from "@playwright/test"; import { allure } from "allure-playwright"; test("Some test", async ({ page }) => { allure.label("jira-prod", "BUG-123"); // ... });
This code defines a relation between the test and the “BUG-123” issue in the “jira-prod” issue tracker. To make this an actual link in the web interface, Allure TestOps will use an issue mapping for “jira-prod”, as configured on step 2.4.
Note that while the example above works, in a real project we recommend to define your own wrapper function instead of specifying the key in
allure.label()
every time. Please consult the Allure Report documentation for your test framework.
1. Install the plugin for Jira
In Jira, click the gear icon in the top right corner and select Manage apps.
If asked, enter the Jira administrator's password.
Using the search box, find the “Allure TestOps for Jira” plugin.
Click Install next to the plugin.
In the dialog that appears, click Accept & install.
Wait until the plugin is downloaded and installed.
2. Enable Jira links in Allure TestOps
After you finish this part of the configuration, Allure TestOps will support links to Jira issues in both test launches and specific test results.
First, the administrator specifies the URL of the Jira server.
Then, any project's owner creates an authentication token in Jira, adds it to Allure TestOps, and configures issue mapping.
2.1. Specify Jira URL in Allure TestOps
Log into Allure TestOps using an administrator account.
Click on your avatar and go to Administration → Integrations.
Click Add integration in the top right corner of the page.
In the dialog that appears, select Jira Server (DC).
Fill in the fields:
- Name — a name to help you recognize the integration, e.g., “Jira production”.
- Endpoint — the URL of the Jira instance, e.g., “https://jira.example.com/”.
If your Jira Data Center server uses a self-signed SSL certificate, check the Disable certificate validation checkbox.
Click Add integration.
2.2. Create a token in Jira
Skip this if you prefer to use your username and password as the credentials on the next step.
In Jira, click on your avatar and go to Profile.
In the menu on the left, click Personal Access Tokens.
Click Create token.
Fill in the fields:
- Token Name — a name to help you recognize the token, e.g., “Token for Allure TestOps”.
- Expiry date — how long the token must stay valid. After this date, the integration will stop working, and you will need to create a new token to continue using the integration. To create a token that never expires, uncheck Automatic expiry.
Click Create.
The new token will become temporarily visible. Copy it.
You will need this token on the next step.
2.3. Add the Jira credentials to Allure TestOps
In Allure TestOps, go to the project page.
In the menu on the left, click Settings → Integrations.
Under the Available integrations, find the Jira Data Center integration and click Add integration next to it.
In the dialog that appears, enter the credentials for connecting to Jira. You can do it via Basic authentication or Token authentication.
On the Basic tab in the dialog, enter the Username and Password of the Jira user.
On the Token tab in the dialog, enter the Token that you got on step 2.2.
Check that the credentials are correct
Click Test connection. After a few moments, a message should appear saying “Connection established”.
Click Add integration to close the dialog and save the settings.
2.4. Configure issue mapping
In Allure TestOps, go to the project page.
In the menu on the left, click Settings → Issues.
Click Create.
Fill in the fields:
- Key — a short integration identifier that you are going to use when writing the tests.
- Issue tracker — the name of the integration that you added on step 2.1.
Click Submit.
3. Configure embedding data into Jira
After you finish this part of the configuration, your Jira Data Center instance will support links to Jira issues in both test launches and specific test results.
First, make sure that secure cookies are enabled for Allure TestOps. Then, get the integration ID and use it when configuring the plugin in Jira.
3.1. Enable secure cookies in Allure TestOps
This section assumes that both Allure TestOps and Jira Data Center are configured to use the encrypted HTTPS protocol. In other cases, please contact our support team.
For security reasons, a user's web browser may block sharing cookies between two different websites, such as Allure TestOps and Jira. This may prevent the embedding on the Jira issue details page.
To fix this, make sure that the “secure cookie” setting is enabled for your Allure TestOps installation.
In the Kubernetes installation, the setting is always enabled and does not require additional configuration.
In the .env file, set ALLURE_SECURE_COOKIE
to true
.
Save the changes and restart Allure TestOps.
In the /opt/testops/conf/testops.conf file, set ALLURE_SECURE
to true
.
Save the changes and restart Allure TestOps.
In the /opt/testops/conf/testops.conf file, set ALLURE_SECURE
to true
.
Save the changes and restart Allure TestOps.
3.2. Find out the integration ID in Allure TestOps
Log into Allure TestOps using an administrator account.
Click on your avatar and go to Administration → Integrations.
Find the Jira Data Center integration.
Remember the ID that is shown next to its name. You will need this ID on the next step.
3.3. Configure the plugin in Jira
In Jira, click the gear icon in the top right corner and select Manage apps.
If asked, enter the Jira administrator's password.
In the menu on the left, click Manage apps.
Expand the Allure TestOps for JIRA section and click Configure.
Fill in the fields:
General settings
- Config — if you are configuring the plugin for the first time or if you need to add an integration with a new Allure TestOps instance, select “Create new config”. Otherwise, select the URL of the instance for which you want to update the settings.
- Endpoint — the URL of your Allure TestOps instance, e.g., “https://demo.testops.cloud”. Make sure not to include the trailing slash in the URL, as it can cause incorrect behaviour of the plugin.
- Version — “Version 4.x.x”.
- Integration ID — the identifier that you got in Allure TestOps on step 3.2.
Panels location
- Test Cases — the location for the test results list.
- Launches — the location for the launches list.
Access
- Selected groups, Groups — for which Jira groups the plugin will be enabled. To enable it for users from all groups, leave Selected groups unchecked.
- Selected projects, Projects — for which Jira projects the plugin will be enabled. To enable it for users from all projects, leave Selected projects unchecked.
While the Panel location options allow you to move lists to the right side (as demonstrated on the screenshot above), doing so is not recommended. Unlike the main area, the right side of Jira's interface is very limited in width, which can make the Allure TestOps list inconvenient on most displays.
Click Save.
4. Enable synchronization of the issue lifecycles
Allure TestOps supports Jira's webhooks. A webhook a way for Jira to notify an external service about a status change of an issue. When receiving such a notification, Allure TestOps will look for any defects related to the issue and update their status correspondingly.
To enable the lifecycle synchronization, generate a webhook in Allure TestOps and add it to Jira.
4.1. Generate a webhook in Allure TestOps
Log into Allure TestOps using an administrator account.
Click on your avatar and go to Administration → Integrations.
Find the Jira Data Center integration and click on its name.
Go to the Webhooks tab.
Click Create webhook, then click Confirm creation.
In the dialog that appears, click the Copy icon to copy the token into clipboard.
You will need this token on the next step.
4.2. Add the webhook to Jira
In Jira, click the gear icon in the top right corner and select System.
In the menu on the left, click Advanced → WebHooks.
Click Create a WebHook.
Fill in the fields:
- Name — a name to help you recognize the webhook.
- Status — “Enabled”.
- URL — the webhook URL that you got on step 4.1.
- Issue related events — select “Issue → updated”.
Click Create at the bottom of the page.
Troubleshooting
The Allure sections display nothing
Empty Allure sections usually indicate that your Jira instance uses HTTPS while Allure TestOps uses HTTP. Unfortunately, such a configuration is not supported. We recommend switching to HTTPS for both products. See Enabling HTTPS.
Once you have enabled HTTPS for Allure TestOps, be sure to replace “http” with “https” in the plugin settings.
The Allure sections display login buttons
If you are logged into Allure TestOps but you still see the Login buttons in Jira, this is most likely caused by the security settings in your web browser. Follow the browser-specific instructions below to make sure that the proper communication between Jira and the Allure TestOps iframes is allowed.
This has to be done individually by each user that encounters this issue.
Go to chrome://settings/cookies.
Choose “Allow third-party cookies”.
Go to about:preferences#privacy.
Under the Enhanced Tracking Protection, choose Custom.
Make sure that the Cookies checkbox is checked.
In the dropdown list next to the Cookies checkbox, choose “Cross-site tracking cookies”.
Go to Safari → Settings.
Open the Privacy tab.
Uncheck the Prevent cross-site tracking checkbox.
The Allure sections display the message “Couldn't connect to Allure TestOps”
If the Allure section say “Couldn't connect to Allure TestOps”, this indicates that Allure TestOps does not recognize the integration ID it receives from Jira.
Please get the integration ID from Allure TestOps and make sure that it is used in the plugin settings.