Skip to main content
No Result Found
Get your setup working faster. Join our Discord for optimisation tips from elite testers. Join our DiscordJoin our Discord

Connect Xray to Test Companion

Connect Xray to Test Companion to browse your test repository in your IDE and turn test cases into automation scripts.

Xray stores your test cases and their execution coverage in Jira. When you connect Xray to Test Companion, you browse that repository from your IDE instead of switching to Jira.

You select a test case, and Test Companion reads its steps, expected results, and preconditions. It then generates an automation script in the chat window. This skips the manual copy and paste between tools.

Test Companion can only fetch test cases that your Jira account can access. Your Jira permissions still apply when Test Companion reads test case data from Xray.

Prerequisites

Before you start, confirm these:

  • Install Test Companion in your IDE and sign in.
  • You have a valid Xray subscription.
  • Connect your Xray account to BrowserStack, as described in Connect Xray.

Connect Xray

You connect Xray to BrowserStack once. After you connect, Test Companion can read test cases from your Xray projects.

  1. Go to the BrowserStack Integrations page.
  2. In the Test Management Tools section, find Xray and click Connect.

    BrowserStack Integrations page listing TestRail, Xray, Azure Test Plans, and Zephyr Scale, each with a Connect button

  3. Complete the connection with your Xray account.

Automate from Xray

After you connect, browse your test repository and generate automation without leaving the IDE.

Currently, you can only automate individual test cases from Xray from the UI.

Select a project and folder

  1. Open Test Companion.
  2. Under Panels, click Test Cases to open the Test Management pane.

    Test Cases button under the Panels heading in Test Companion

  3. In the Test Management Service dropdown, select Xray.

    Test Management Service dropdown open, showing BrowserStack, Zephyr Scale, Xray, Azure, and TestRail

  4. Use the dropdown menus in the Test Cases pane to navigate your repository:
    • Project: Select the Jira project that holds your test cases.
    • Folder: Browse the folder tree to find specific test suites.

View test cases

  1. Click a folder to list the test cases it contains. Each test case shows key details:
    • Test ID, such as T-45
    • Name
    • Description
    • Test Steps
    • Priority

In the test cases panel, Preconditions are not shown in the table, but they will be retrieved when you click the Automate button for that specific test case.

Generate automation

To automate a test case:

  1. Find the test case in the list.
  2. Click Automate next to the test case.

    Test Companion adds the test case details to the chat input.

  3. Click Send message (➤).

Test Companion reads the steps, expected results, and preconditions from Xray. It generates an automation script in the chat window, matched to your selected framework.

What Test Companion reads from Xray

When you automate a test case, Test Companion fetches these fields to build context:

Field What it provides
Test ID The unique identifier for the test case, such as T-45
Name The name of the test case
Description A summary of what the test case covers
Test Steps The manual steps the script should follow
Expected Results The outcome expected after each step
Preconditions The setup required before the steps run
Priority The priority assigned to the test case in Xray

Next steps

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle