Connect Azure Test Plans to Test Companion
Connect Azure Test Plans to Test Companion to browse your test repository in your IDE and turn test cases into automation scripts.
Azure Test Plans stores your manual test cases, suites, and configurations in Azure DevOps. When you connect Azure Test Plans to Test Companion, you browse that repository from your IDE instead of switching to Azure DevOps.
You select a test case, and Test Companion reads its steps, expected results, and configurations. It then generates an automation script in the chat window.
Test Companion can only fetch work items that your Azure DevOps account can access. Your Azure DevOps permissions still apply when Test Companion reads work item context.
Set up Azure Test Plans for your IDE
In Visual Studio Code, the Test Cases panel reaches Azure Test Plans through the Azure DevOps MCP server. In every IDE, it reaches Azure Test Plans through the BrowserStack integration. Select your IDE:
In Visual Studio Code, the Test Cases panel uses the Azure DevOps MCP server once the server is connected. When the server is not connected, the panel uses the BrowserStack integration described in the Other IDEs tab. The panel never starts an MCP sign-in on its own.
Prerequisites for the MCP server
Ensure you have the following:
- Test Companion is installed in Visual Studio Code and you are signed in.
- A Microsoft account with access to the Azure DevOps projects that hold your test plans.
- An Azure administrator has completed the one-time setup for your Microsoft Entra tenant. Until then, the Microsoft sign-in fails for everyone in your organization. The steps are in One-time setup by an Azure administrator.
- Your test cases belong to a test suite in Azure Test Plans. Test cases outside a suite are not available.
Connect the Azure DevOps MCP server
To connect the server:
- Click
...(more options) on the Test Companion panel, then select MCP Servers. -
Select the Catalog tab, then click Connect on the Azure DevOps card.

- Sign in with your Microsoft account in the browser and grant the requested access, then return to your IDE. The Installed tab shows the server with a green dot and its tool count.
For the controls of a connected server, see Azure DevOps in Connect an MCP server to Test Companion.
Actions that are not available over the MCP server
Over the MCP server, these actions are not available in the Test Cases panel:
- Creating projects, preconditions, or BDD test cases.
- Deleting test cases.
- Viewing test steps and test scripts.
- Choosing custom field values from a list. You type the value instead.
The rest of this page applies to both routes.
Automate from Azure Test Plans
After you connect, browse your test plans and suites, then generate automation without leaving the IDE.
Select a project and suite
- Open Test Companion.
-
Under Panels, click Test Cases to open the Test Management pane.

-
In the Test Management Service dropdown, select Azure.

-
In the Project dropdown, select the Azure DevOps project that holds your test plans. The dropdown loads available projects and supports search.

View test cases
-
Your test plans and suites appear in a folder view on the left. Click a suite to load its test cases in the grid.

Static sub-suites appear as nested folders. All suite types work, including static, requirement-based, and query-based.
Generate automation
To automate a test case:
- Select the test case you want to automate in the grid.
-
Click Automate to send the test case to Test Companion.
Test Companion adds the test case details to the chat input.
- Write a prompt if you need one, then click Send message.
Test Companion reads the steps, expected results, and configurations from Azure Test Plans. It generates an automation script in the chat window, matched to your selected framework.
When a test case has a linked work item, such as a User Story or Requirement, Test Companion fills the Requirement field in Test Management with that link. You get traceability from requirement to test case without any extra steps.
If the task is interrupted because Azure DevOps was not connected yet, complete the integration flow and then repeat the same prompt.
What Test Companion reads from Azure Test Plans
When you automate a test case or paste a link in chat, Test Companion fetches these fields to build context:
| Field | What it provides |
|---|---|
| Test Suite Name | The name of the suite to which the test case belongs |
| Test ID | A unique identifier for the test case |
| Test Name | The title or name of the test case |
| Steps and Expected Results | The manual steps that the script should follow, along with the expected outcomes |
| Shared Steps | Reusable sequences of steps that can be referenced across multiple test cases |
| Linked Work Item | The associated requirement or backlog item, if applicable |
| Configurations | Parameters including browser, operating system, and environment (in JSON format) |
| Automation Status | Indicates whether the test case has been marked as automated |
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!
