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 TestRail to Test Companion

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

TestRail stores your test cases, suites, and execution results. When you connect TestRail to Test Companion, you browse that repository from your IDE instead of switching to the TestRail web app.

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 TestRail account can access. Your TestRail permissions still apply when Test Companion reads test case data.

Prerequisites

Before you start, confirm these:

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

Connect TestRail

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

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

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

  3. Enter your TestRail connection details, then confirm the connection.

Automate from TestRail

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

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

Select a project and suite

  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 TestRail.

    TestRail selected in the Test Management Service dropdown

  4. Use the dropdown menus in the Test Cases pane to navigate your repository:
    • Project: Select the TestRail project that holds your test cases.
    • Suite: Select the test suite within the project.
    • Section: Browse the section tree to find specific test cases.

View test cases

  1. Click a section to list the test cases it contains. Each test case shows key details:
    • Test ID, such as C45
    • Title
    • Steps
    • Priority

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 TestRail. It generates an automation script in the chat window, matched to your selected framework.

What Test Companion reads from TestRail

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 C45
Title The name of the test case
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 TestRail

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