Integration with Jira Software Cloud
Jira Software Cloud is the cloud edition of the popular Jira issue tracker. This article describes how to configure the integration between a Jira Software Cloud 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 Jira Software Cloud, 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, select Apps → Explore more apps in the top navigation menu.
Using the search box, find the “Allure TestOps for Jira” plugin.
Click Get app next to the plugin.
In the dialog that appears, click Get it now.
Wait until a message appears saying “Allure TestOps for Jira installed successfully”.
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 instance.
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 Software Cloud.
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://example.atlassian.net/”.
Click Add integration.
2.2. Create a token in Jira
In Jira, click on your avatar and go to Manage account.
In the top navigation menu, go to Security.
Under the API tokens section, click Create and manage API tokens.
Click Create API token.
Enter a name to help you recognize the token, e.g., “Token for Allure TestOps”.
Click Create, then click Copy.
The new token will be copied into your clipboard.
You will need this token on the next step.
2.3. Add the token 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 Software Cloud integration and click Add integration next to it.
In the dialog that appears, fill in the fields:
- Username — the email that you use to log into Jira Software Cloud.
- API token — the API 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
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 in 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, select Apps → Manage your apps in the top navigation menu.
Expand the Allure TestOps for JIRA section and click Configure.
Fill in the fields:
General settings
- Enabled — must be checked.
- Endpoint — the URL of your Allure TestOps instance, e.g., “https://demo.testops.cloud”.
- 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.
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 Software Cloud 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 a connection failure icon or an error message
When Jira displays a connection failure indicator (an icon or a “502 Bad Gateway”, depending on the browser) instead of the Allure TestOps lists, first make sure if Allure TestOps itself is available in a separate tab. If it is but the problem remains, this means that the Jira Software Cloud's policy does not allow the web page to communicate with iframes from your Allure TestOps' domain.
To solve this problem, you will have to contact Atlassian support. Before you do, we recommend you to find out an example of an iframe's URL that is not displayed.
In Jira, open an issue page where the Allure TestOps content is expected to be displayed.
Open your browser's developer tools. The exact way to do it may vary depending on the browser.
Go to Menu → More tools → Developer tools and click the Inspect element icon or just press Ctrl+Shift+C.
Go to Menu → More tools → Web Developer Tools and click the Inspect element icon or just press Ctrl+Shift+C.
Make sure that features for web developers are enabled in the browser. Then go to Menu → Develop → Show Web Inspector and click the Start element selection icon or just press Command+Shift+C.
Hover the area where the content is expected to be displayed. In the HTML source tree, find the
<iframe>
element that corresponds to it.Copy the URL of the iframe's
src
attribute.The web page may contain multiple iframes, some of them within others (see the screenshot). Make sure that the URL that you've copied points to the Allure TestOps domain.
Write to Atlassian support, providing them with the iframe's URL.
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.
Under the Default behavior section, 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.