Skip to main content

Jira (Beta)

Jira is an issue and project tracking tool that teams use to plan, track, and resolve work. The Sauce Labs integration with Jira lets you create Jira tickets directly from your Sauce Labs test results, so you can log a defect where you find it without copying details between tools.

Each ticket includes the test context you choose and a link back to the result in Sauce Labs, and stays linked to the test result, so you can see which tickets were already created for it.

note

To create Jira issues from production errors and crashes instead of test results, see Jira Integration with Error Reporting.

How It Works​

An organization admin connects your Jira Cloud site to your Sauce Labs organization by authorizing Sauce Labs with Atlassian. After the site is connected, you can create Jira tickets manually from the following places in Sauce Labs:

  • Automated > Test Results
  • Automated > Test Details
  • Automated > Builds > Build Details
  • Visual > Builds > Build Details, in the snapshot review

When you create a ticket, you choose the Jira project and issue type, edit the ticket summary and description, and select the test details and attachments to include, such as screenshots, the video, and logs. Sauce Labs creates the ticket in Jira and links it to the test result. A Jira icon with the number of linked tickets appears on the test result, and you can open the list of linked tickets and their details without leaving Sauce Labs.

You can use the integration to:

  • Create a Jira ticket for a failed test from the place where you find the failure.
  • Include only the test context that matters, such as the test name, job ID, status, OS, and browser.
  • Attach screenshots, the video, and logs from the test to the ticket.
  • See the Jira tickets already created for a test result, and their status, before you create another one.

Prerequisites​

Before you begin, make sure you have:

  • A Jira Cloud site.
  • A Sauce Labs account with access to the Integrations page. Only an organization admin can connect or disconnect a Jira site.
  • An Atlassian account for the organization admin who connects the site, with permission to create issues in the Jira projects where you want to create tickets. Sauce Labs creates every ticket with this account.

Authentication and Permissions​

The Jira integration uses Atlassian's app authorization instead of an API key or token. When you connect a Jira site, Atlassian asks you to choose the site and to authorize Sauce Labs to access it on your behalf. Atlassian lists the permissions that Sauce Labs requests before you accept.

Sauce Labs creates every ticket with the Atlassian account of the organization admin who connected the site. Other users don't sign in to Atlassian to create tickets, so the connecting account needs permission to create issues in each Jira project you want to use.

Sauce Labs requests the following permissions:

TypePermissions
Readread:project:jira, read:project.property:jira, read:project.component:jira, read:project-category:jira, read:project-version:jira, read:issue-type:jira, read:issue-type-hierarchy:jira, read:issue-meta:jira, read:field:jira, read:field.default-value:jira, read:field.option:jira, read:field-configuration:jira, read:status:jira, read:issue-status:jira, read:issue.transition:jira, read:issue:jira, read:issue-details:jira, read:issue-security-level:jira, read:issue.changelog:jira, read:issue.vote:jira, read:attachment:jira, read:user:jira, read:application-role:jira, read:group:jira, read:avatar:jira
Writewrite:issue:jira, write:issue.property:jira, write:attachment:jira, write:comment:jira, write:comment.property:jira
Otheroffline_access, which keeps the connection active without signing in again.

To revoke access, disconnect the Jira site in Sauce Labs.

Set Up the Integration​

An organization admin connects the Jira Cloud site once for the whole organization.

Connect Your Jira Cloud Site​

Step 1: Inside your Sauce Labs account, click on your profile icon in the top-right corner, and then select Integrations from the dropdown list.

Integrations option in the profile menu

Step 2: Find Integrate with Jira and click on Configure. The Jira Configuration page opens.

Integrate with Jira on the Integrations page

Step 3: Click Connect Jira. This starts the process of connecting your Jira Cloud site to Sauce Labs.

Connect Jira button on the Jira Configuration page

Step 4: Log in to your Atlassian account. Then select the Jira Cloud site you want to connect, review the permissions that Sauce Labs requests, and select Accept.

Atlassian login page

Step 5: After authorization is complete, you are redirected to the Jira Configuration page. The Jira site appears under Connected Sites with the Connected status.

Connected Jira site under Connected Sites on the Jira Configuration page

Verify the Integration​

After setup, confirm the integration from both sides:

  • In Sauce Labs: On the Jira Configuration page, the Jira site appears under Connected Sites with the Connected status. If it does not, see Connect Your Jira Cloud Site.
  • In Jira: Create a test ticket from a test result, as described in Create a Jira Ticket, and check that it appears in the Jira project you selected.

If either check fails, see Troubleshooting.

Create a Jira Ticket​

You create a Jira ticket from the Create Jira Ticket dialog. You can open the dialog from the Test Results, Test Details, and Build Details pages, and from the snapshot review in Visual Testing. The dialog works the same way everywhere. The test details and attachments it offers depend on the test.

From the Test Results Page​

Step 1: In Sauce Labs, click Automated, and then click Test Results.

Test Results option under Automated in the left navigation

Step 2: Find the test result you want to create a ticket for, and then select the ⋮ (More options) menu at the end of its row.

More options menu at the end of each test result row on the Test Results page

Step 3: Select Create JIRA Ticket.

Create JIRA Ticket option in the More options menu of a test result on the Test Results page

Step 4: Complete the Create Jira Ticket dialog. See Fill In the Create Jira Ticket Dialog.

From the Test Details Page​

Step 1: Open the Test Details page for the test result you want to create a ticket for.

Step 2: Click the Jira icon below the test name. The Jira Tickets drawer opens and lists the tickets already linked to the test.

Jira icon with the number of linked tickets on the Test Details page

Step 3: Select Create Jira Ticket.

Create Jira Ticket button in the Jira Tickets drawer

Step 4: Complete the Create Jira Ticket dialog. See Fill In the Create Jira Ticket Dialog.

From the Build Details Page​

Create a ticket from a build to report a problem with the build as a whole, such as several failed tests.

Step 1: In Sauce Labs, click Automated, click Builds, and then click the build you want to create a ticket for.

Builds page under Automated with the list of builds

Step 2: On the Build Details page, select the ⋯ (More options) menu in the upper-right corner, and then select Create JIRA Ticket.

Create JIRA Ticket option in the More options menu on the Build Details page

Step 3: Complete the Create Jira Ticket dialog. See Fill In the Create Jira Ticket Dialog.

From the Visual Snapshot Review​

Create a ticket from a visual snapshot to report a visual change that is a defect.

Step 1: In Sauce Labs, click Visual Testing, and then click Builds.

Builds option under Visual Testing in the left navigation

Step 2: Click the build that contains the snapshot you want to report.

List of Visual Testing builds on the Builds page

Step 3: Open the snapshot you want to report. The snapshot review opens and shows the baseline and the current snapshot.

Snapshots of a test on the Visual Testing Build Details page

Step 4: Select the ⋯ (More options) menu in the upper-right corner, and then select Create Jira Ticket.

Create Jira Ticket option in the More options menu of the visual snapshot review, with the baseline and current snapshots side by side
note

The Create Jira Ticket option appears only when both the snapshot and its baseline are available. For example, it does not appear for a new snapshot that doesn't have a baseline yet.

Step 5: Complete the Create Jira Ticket dialog. See Fill In the Create Jira Ticket Dialog.

Create Jira Ticket dialog opened from the visual snapshot review, with the linked visual test

Fill In the Create Jira Ticket Dialog​

The Create Jira Ticket dialog shows the connected Jira site next to Workspace, and the test the ticket will be linked to under Linked test. If more than one Jira site is connected, the dialog also shows a Jira Site list above Project. Select the site where you want to create the ticket first.

Step 1: In Project, search for and select the Jira project where you want to create the ticket. The rest of the fields appear after you select a project.

Project field in the Create Jira Ticket dialog

Step 2: Complete the ticket fields described in the following table. The fields available after Project depend on the configuration of the selected Jira project.

Ref.FieldDescription
1ProjectThe Jira project where the ticket is created. Search by project name or key.
2Issue TypeThe Jira issue type of the ticket, for example, Bug.
3SummaryThe title of the ticket in Jira. Sauce Labs fills it in from the test result, and you can edit it.
4StatusThe Jira status to move the ticket to, for example, In Progress. Jira always creates the ticket in the first status of its workflow, and Sauce Labs then moves it to the status you select. If the Jira workflow doesn't allow that move, the ticket stays in its first status, and a warning tells you so.
5PriorityThe Jira priority of the ticket, for example, Major.
6Include in DescriptionThe test details to add to the ticket description: Test name, Job ID, Status, OS, and Browser. Select or clear each detail. You can also edit the description text directly.
7AssigneeThe Jira user the ticket is assigned to. Search by name.
8Tags(Optional) Labels to add to the ticket. Separate multiple tags with commas, for example, cypress, e2e, failed-test.
9AttachmentsThe files from the test to attach to the ticket, such as screenshots, the video, the browser console log, the job configuration, the test report, and the Sauce Labs job log. The video is uploaded as a file, video.mp4. Files larger than 25 MB aren't attached. The available files depend on the test.
10Linked testThe test result that the ticket is linked to, with its status. Select Linked tickets to view the tickets already linked to the test.
Create Jira Ticket dialog with the ticket fields, the description, and the attachments

Step 3: After you complete the fields and select the attachments, click Create Ticket.

Create Ticket button in the Create Jira Ticket dialog

Result: Sauce Labs creates the ticket in Jira and uploads the selected attachments to it. While the files upload, the button shows Attaching assets. When the upload is complete, Sauce Labs shows the Ticket created successfully message, with a link to open the ticket in Jira. If a file can't be attached, a warning lists the file and the reason. The ticket is linked to the test result, and the number next to the Jira icon on the test result increases by one.

Ticket created successfully message with a link to the ticket in Jira

View Linked Jira Tickets​

Every ticket you create from Sauce Labs stays linked to its test result. A Jira icon with the number of linked tickets appears on the test result on the Test Results, Test Details, and Build Details pages, and in the visual snapshot review. Hover over the icon to see the number of tickets. Check the linked tickets before you create a new one to avoid duplicates.

Step 1: Open the linked tickets in one of the following ways:

  • On the Test Details or Build Details page, click the Jira icon.
  • In the visual snapshot review, select the ⋯ (More options) menu, and then select View Existing Jira Tickets.
  • In the Create Jira Ticket dialog, select Linked tickets under Linked test.

The Jira Tickets drawer opens and lists the tickets linked to the test. Each ticket card shows the ticket key, Jira status, priority, summary, assignee, and creation date.

Jira Tickets drawer listing the tickets linked to a test

Step 2: (Optional) Use the Search by title or assignee field to find a ticket. To get the latest status of the tickets from Jira, select the Refresh icon.

Step 3: Select a ticket card to view the ticket details, including the issue type, reporter, project, tags, and description. To open the ticket in Jira, select the ticket key.

Ticket details in the Jira Tickets drawer

Manage the Integration​

Disconnect a Jira Site​

Disconnect the Jira site when you no longer want to create Jira tickets from Sauce Labs. Only an organization admin can disconnect a Jira site.

Step 1: On the Integrations page, find Integrate with Jira and click on Configure.

Configure button for Integrate with Jira on the Integrations page

Step 2: Under Connected Sites, click Disconnect next to the Jira site.

Disconnect button for the connected Jira site on the Jira Configuration page

Result: The Jira site is disconnected from Sauce Labs. If no other Jira site is connected, the Create Jira Ticket option is disabled, with the hint Connect a Jira site under Integrations. Tickets that were already created stay in Jira.

Troubleshooting​

If the Jira integration does not work as expected, use the following solutions to resolve common issues.

You cannot connect a Jira site
Only an organization admin can connect a Jira site, and the site must be a Jira Cloud site. If your Atlassian organization restricts app access, contact your Atlassian administrator.
The Create Jira Ticket option is disabled
If the Create Jira Ticket option is disabled with the hint Connect a Jira site under Integrations, no Jira site is connected to your organization. Check that a Jira site is listed under Connected Sites on the Jira Configuration page. If no site is connected, contact an organization admin to connect your Jira Cloud site.
You can't create a ticket in a Jira project
The Project list shows every project that the Atlassian account used to connect the site can see, including projects it can't create issues in. Sauce Labs creates tickets with that account, not with your own. Ask your Jira administrator to give the connecting account permission to create issues in the project.
An attachment is missing from the ticket
Files larger than 25 MB, including the video, aren't attached to the ticket. If a file fails to upload, the Create Jira Ticket dialog shows a warning with the file and the reason. To share a file that wasn't attached, add it to the ticket in Jira.
The ticket status in Sauce Labs is out of date
In the Jira Tickets drawer, select the Refresh icon to get the latest status from Jira.

Next Steps​