DEV Community

Abdul Qadir
Abdul Qadir

Posted on • Originally published at Medium on

Getting Started with Xray for Jira: Setup, Test Configuration, and API Keys

If you're building test automation, integrating CI/CD pipelines, or working with AI-driven QA workflows, setting up Xray correctly is the first step.

This guide walks you through the full setup—from installation to generating API credentials you can use in automation.


What Is Xray?

Xray Test Management is a powerful test management app that integrates directly with Jira. It allows teams to manage manual and automated tests, track execution results, and connect testing to requirements and defects.


Step 1 — Install Xray in Jira

  1. Log in to your Jira Cloud instance
  2. Click the Settings icon (gear)
  3. Select Apps or Manage apps
  4. Click Find new apps
  5. Search for Xray Test Management
  6. Click Try it free or Install

After installation, Xray will be added to your Jira environment.

Note: You must be a Jira administrator to install apps.


Step 2 — Create a Test Issue Type in Jira

Xray stores test cases as a special issue type called Test. If your Jira instance does not already have this issue type, you must create it.

  1. Go to Space Settings
  2. Click Add work type
  3. Name it Test
  4. Select an icon and click Create


Step 3 — Link the Jira Test Issue Type to Xray

After creating the Test issue type, ensure Xray recognizes it.

  1. Open Jira Settings
  2. Navigate to Apps
  3. Open Xray settings
  4. Locate Issue Type Mapping or Test Issue Configuration
  5. Confirm that the Test issue type is mapped as an Xray Test

This allows Xray to treat those issues as test cases.


Step 4 — Generate Client ID and Client Secret

To use Xray’s REST API (for automation tools or scripts), you need authentication credentials.

  1. In Xray settings, find the API Keys or API Access section
  2. Click Create API Key or Generate Credentials
  3. Copy the Client ID
  4. Copy the Client Secret
  5. Store both values securely

Important: The Client Secret is sensitive and may not be shown again.


Step 5 — Use the Credentials (API Example)

Once you have your credentials, you can authenticate with Xray and start using its APIs.

Here’s a simple example to get an authentication token:


bash
curl -X POST "https://xray.cloud.getxray.app/api/v2/authenticate" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET"
  }'
Enter fullscreen mode Exit fullscreen mode

Top comments (0)