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.
Lists of launches and test results from Allure TestOps are added to Jira issues using an iFrame component. 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 needs to specify the URL of the Jira instance.
Then, any project owner needs to create an authentication token in Jira, add it to Allure TestOps, and configure issue mapping.
2.1. Specify Jira URL in Allure TestOps
Log into Allure TestOps using an administrator account.
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 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, open your project.
Go to 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.
Click Test connection. If the credentials are correct, a "Connection established" message will appear within a few seconds.
Click Add integration to save the settings.
2.4. Configure issue mapping
In Allure TestOps, open your project.
Go to 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 Software Cloud 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 values.yaml file, set network.tls.secureCookie
to true
.
In the .env file, set TESTOPS_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.
Go to Administration → Integrations.
Find the Jira Software Cloud integration.
Copy the ID that is shown next to the integration 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.
Go to Administration → Integrations.
Find the Jira Software Cloud integration and click 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 webhook URL into clipboard.
You will need this URL in 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
In Jira issues, viewing and managing Allure TestOps entities is done through an iFrame component. Below are examples of possible errors that may appear in the iFrame, along with recommendations for resolving them.
iFrame sections display a connection failure icon or an error message
If the iFrame displays a connection failure indicator (an icon or the text “502 Bad Gateway”) instead of data from Allure TestOps, go to your Allure TestOps instance and make sure that it is available.
If Allure TestOps opens but the problem remains, this means that the Jira Software Cloud policy does not allow the web page to communicate with the iFrame from your Allure TestOps domain. To solve this problem, you will need to contact Atlassian support. Before you do, we recommend you to identify the URL of the iFrame section that isn’t displaying.
In Jira, open an issue page where the Allure TestOps content is expected to be displayed.
Open the developer tools in your browser:
- In the top menu, go to View → Developer → Developer Tools.
- Click the Select an element in the page to inspect it icon or press Ctrl+Shift+C.
- In the top menu, go to Tools → Browser Tools → Web Developer Tools.
- Click the Pick an element from the page icon or press Ctrl+Shift+C.
- Make sure that features for web developers are enabled.
- In the top menu, go to Develop → Show Web Inspector.
- Click the Start element selection icon or press Command+Shift+C.
Hover the area where the content from Allure TestOps is expected to be displayed. In the HTML source tree, find the
<iframe>
element that corresponds to it.Copy the URL of the
src
attribute in the<iframe>
element.The web page may contain multiple
<iframe>
elements, some of them within others. Make sure that the URL that you copied points to the Allure TestOps domain.Write to Atlassian support, providing them with the iFrame's URL.
iFrame 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 iFrame is allowed.
Each user who encounters this error needs to do these steps.
Go to your browser settings (chrome://settings/cookies).
Go to Privacy and security → Third-party cookies.
Select Allow third-party cookies.
Go to your browser settings (about:preferences#privacy).
Go to the Privacy & Security section.
Under Enhanced Tracking Protection, select Custom.
Make sure that the Cookies checkbox is selected.
In the drop-down list next to the Cookies checkbox, select Cross-site tracking cookies.
In the top menu, go to Safari → Settings.
Go the Privacy tab.
Clear the Prevent cross-site tracking checkbox.
iFrame sections display the message “Couldn't connect to Allure TestOps”
The message “Couldn't connect to Allure TestOps” means that an incorrect integration ID is specified in the plugin settings in Jira.
To fix the error:
- Find the relevant integration ID in Allure TestOps.
- Make sure that this ID is specified in the plugin settings.