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.
- Go to the BrowserStack Integrations page.
-
In the Test Management Tools section, find Xray and click Connect.

- 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
- Open Test Companion.
-
Under Panels, click Test Cases to open the Test Management pane.

-
In the Test Management Service dropdown, select Xray.

- 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
- 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:
- Find the test case in the list.
-
Click Automate next to the test case.
Test Companion adds the test case details to the chat input.
- 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
- Automate tests: Convert selected test cases into automation scripts.
- Generate test cases: Generate new test cases from requirements or by exploring a URL.
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
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!