Jira Integration with Confluence

Jira and Confluence are both Atlassian products designed to integrate seamlessly.

The integration allows better collaboration, real-time visibility, and traceability between project documentation and development work (issues, stories, bugs, etc.).


Advertisement

Benefits of Integrating Jira with Confluence

A Confluence page can display the following linked Jira data:

Confluence Content Linked Jira Data
Product Requirement Linked Jira stories & epics
Test Plan Linked test cases / test executions
Sprint Reports Jira sprint status & burndown
Release Notes Jira issues fixed in the release

Prerequisites

  • Both Confluence and Jira must be hosted (Cloud or Server).

  • You should have administrator rights or the appropriate permissions.


(Jira Server & Confluence Server)

In Jira

  1. Go to:

    Administration → Applications → Application Links

  2. Enter the URL of your Confluence site.

  3. Click Create New Link.

  4. Fill in the required information.

  5. Select Create Incoming and Outgoing Links.

In Confluence

  1. Go to:

    Confluence Administration → Application Links

  2. Enter the Jira URL.

  3. Follow the same configuration steps.

Authentication

Authentication can be done using:


Method 2 – Jira Cloud + Confluence Cloud

If you're using Jira Cloud and Confluence Cloud, the integration is available out of the box.

You can:


Using the Jira–Confluence Integration Day-to-Day

Embed Jira Issues in Confluence Pages

Navigate to:

Confluence Page → "+" → Jira Issue/Filter Macro

You can display:

  • A single Jira issue

  • A table of filtered issues

  • JQL-based search results

Example JQL

project = "QA" AND issuetype = Bug AND status != Closed

Create Jira Issues from Confluence

Highlight any text in Confluence.

Click Create Jira Issue.

Select:

  • Project

  • Issue Type

  • Priority

  • Assignee


Inside a Jira ticket:

  • Use the Issue Links section, or

  • Use the Confluence Pages section.

You can:

  • Automatically view linked documentation.

  • Manually link existing Confluence pages.


Interview Answer

"Yes, we integrated Jira with Confluence in our project to maintain traceability and documentation. For every user story or requirement document in Confluence, we linked the corresponding Jira epics and stories. We also created Jira dashboards and embedded filtered issue tables into our Confluence test plans. This helped the business and QA team track requirements, test progress, and defects in one place. I often created release notes and linked the Jira issues fixed in that release to improve collaboration."


Integrating Jira with Selenium and CI Tools Like Jenkins

Real-Time Use Case

Imagine you're running automated Selenium tests through a Jenkins pipeline, and you want the test results to automatically update Jira, create bugs, or make Jenkins builds traceable in Jira issues.

This is where Jira integration becomes useful.


Integration Overview

Tool Purpose
Jira Tracks issues, bugs, features, and test execution
Jenkins Executes CI/CD pipelines and runs Selenium tests
Selenium Performs automated browser testing

Integrating Jenkins with Jira

Purpose

Integrating Jenkins with Jira helps you:

  • Automatically log builds.

  • Associate builds with Jira issues.

  • Update Jira tickets after builds or test execution.

  • Add comments.

  • Change issue status automatically.

Steps

Install the Jira Plugin in Jenkins

Navigate to:

Jenkins Dashboard → Manage Jenkins → Manage Plugins → Available

  • Search for Atlassian Jira Plugin.

  • Install the plugin.

  • Restart Jenkins.


Configure Jira in Jenkins

Navigate to:

Manage Jenkins → Configure System

Find:

Jira Steps Configuration

Provide:

  • Jira Base URL (Example: https://yourcompany.atlassian.net)

  • Username

  • API Token (or Password)

  • Unique ID (Example: jiraProd)


Use Jira Integration in the Jenkins Pipeline

Inside a Jenkinsfile, you can use commands such as:

jiraComment body: 'Automation Test Passed', issueKey: 'QA-123'

This can be used to:

  • Comment on Jira issues

  • Transition issue status

  • Create issues

  • Upload attachments (such as test reports)


Integrating Selenium Results with Jira

Scenario

When a Selenium test fails, automatically:

  • Create a Jira bug, or

  • Update an existing Jira issue.


Option A – Using the Jira REST API

Inside your Selenium framework:

Example

POST https://yourcompany.atlassian.net/rest/api/2/issue

Complete Java example (no extra libraries)

import java.net.URI;
import java.net.http.*;
import java.nio.charset.StandardCharsets;
import java.util.Base64;

public class JiraBugReporter {
    private static final String BASE = System.getenv("JIRA_URL");            // e.g. https://yourcompany.atlassian.net
    private static final String AUTH = "Basic " + Base64.getEncoder().encodeToString(
            (System.getenv("JIRA_EMAIL") + ":" + System.getenv("JIRA_API_TOKEN")).getBytes(StandardCharsets.UTF_8));
    private static final HttpClient HTTP = HttpClient.newHttpClient();

    /** Creates a Bug and returns Jira's JSON response (contains the new key, e.g. "QA-231"). */
    public static String createBug(String project, String summary, String details) throws Exception {
        String body = """
            {"fields": {
               "project":   {"key": "%s"},
               "issuetype": {"name": "Bug"},
               "summary":   "%s",
               "description": "%s",
               "labels": ["automation"]
            }}""".formatted(project, escape(summary), escape(details));

        HttpRequest request = HttpRequest.newBuilder(URI.create(BASE + "/rest/api/2/issue"))
                .header("Authorization", AUTH)
                .header("Content-Type", "application/json")
                .POST(HttpRequest.BodyPublishers.ofString(body))
                .build();
        HttpResponse<String> response = HTTP.send(request, HttpResponse.BodyHandlers.ofString());
        if (response.statusCode() != 201) throw new IllegalStateException(response.statusCode() + ": " + response.body());
        return response.body();
    }

    private static String escape(String s) {
        return s.replace("\\", "\\\\").replace("\"", "\\\"").replace("\n", "\\n");
    }
}

We compiled it with Java 21 and ran it against a local mock of the endpoint: it sent the Basic auth header and a correctly escaped JSON body (including quotes and a line break in the text), and returned the new key QA-231. Points that trip people up:

  • Jira Cloud needs an API token, not your password — create one in your Atlassian account settings and keep it in an environment variable or CI secret.
  • API v2 vs v3: /rest/api/2/issue accepts a plain-text description; /rest/api/3/issue requires the description in Atlassian Document Format (JSON), so plain strings fail.
  • Don't create duplicates: before creating, search with JQL (for example summary ~ "LoginTest failed" AND statusCategory != Done) and add a comment to the existing bug instead. A flaky test that files a new bug every night quickly floods the backlog — many teams only auto-create bugs after a failure repeats.

Authentication

Send a JSON Payload Containing

  • Project Key

  • Summary

  • Issue Type = Bug

This is commonly triggered inside:

  • @AfterMethod

  • A catch block whenever a test fails


Option B – Sending Results from Jenkins to Jira

Use a Jenkins post-build step (Groovy script or plugin) to:

  • Read the test report.

  • Update the Jira issue.

  • Change the issue status.

  • Add execution comments.


Bonus: Jenkins + Jira + Allure Reports + Selenium

A common workflow is:

  1. Run Selenium tests through Jenkins.

  2. Generate Allure Reports.

  3. Upload Allure reports to Jira using the REST API or CI hooks.


Tagging Jira Issue IDs in Commit Messages

If you write a commit such as:

git commit -m "Fix login bug QA-101"

The Jenkins and Jira integration automatically:

  • Links the commit with Jira issue QA-101.

  • Displays build history inside the Jira ticket.

  • Improves end-to-end traceability.


Interview Answer

"In our project, we integrated Jenkins with Jira using the Atlassian plugin. Whenever a Selenium test case failed, our Jenkins job used the Jira REST API to log a bug with a screenshot and failure details. We also tagged Jira issue IDs in commit messages so Jenkins builds were linked back to Jira. This provided complete traceability from requirements to code, from code to testing, and from testing to release. We even embedded test reports inside Jira issues, making it easier for stakeholders to review execution results."


Running Selenium inside Jenkins agents usually means browsers in containers — see how to set up Selenium Grid with Docker for CI in the Docker + Selenium Grid Guide. Jenkins side: Jenkins Pipelines & Jenkinsfile.

From Real Projects

Jira has been my defect-tracking tool throughout my testing career, with TestRail for test execution. Preparing bug reports, retesting fixes and taking part in sprint planning, reviews and retrospectives all meant working in Jira every day. Learn the workflow your team uses, and keep every bug linked to the story it affects. On Canolog, every department — sales, inventory, finance, service and parts — connects to the others, so a change in one module had to be checked in the flows that depend on it. Avoid creating duplicate bugs automatically — search before you create.


📚 Official documentation: Jenkins documentation · Jira Cloud documentation (Atlassian)

FAQs

Why integrate Jira with Confluence?

It connects project documentation with development work.

Confluence pages can display linked Jira stories, test cases, sprint status, and release information, providing complete traceability and centralized visibility.

How do you integrate Jira with Confluence?

You can integrate Jira and Confluence using:

  • Application Links (AppLinks) for Jira Server and Confluence Server.

  • Built-in integration for Jira Cloud and Confluence Cloud, using the Jira Issues macro and automatic page linking.

How do you embed Jira issues in a Confluence page?

Use the Jira Issue/Filter macro to display:

  • A single Jira issue

  • A filtered issue table

  • JQL-based search results

Example

project = "QA" AND issuetype = Bug AND status != Closed

How do you integrate Jenkins with Jira?

  • Install the Atlassian Jira Plugin in Jenkins.

  • Configure the Jira Base URL and credentials.

  • Use pipeline steps such as jiraComment to comment on, transition, or create Jira issues.

How do you automatically create a Jira bug from a failed Selenium test?

Call the Jira REST API from your Selenium framework (typically inside @AfterMethod or a catch block) to create a Bug issue with failure details, or use a Jenkins post-build step to update Jira based on the generated test report.

How does tagging a Jira issue ID in a commit help?

Including the Jira issue key (for example, QA-101) in the Git commit message automatically links the commit with the Jira issue and displays build history within the ticket, providing complete development and deployment traceability.