Skip to main content
VS Code Demo TestDriver makes it easy to write automated computer-use tests for web browsers, desktop apps, and more. Follow the directions below to run your first TestDriver test.
Requires GitHub Copilot
1

Install the TestDriver Extension

Click the link below to install the TestDriver extension for VS Code:

Install TestDriver Extension

Get the TestDriver VS Code extension from the VS Code marketplace
2

Complete the Walkthrough

VS Code DemoThe TestDriver VS Code extension supercharges your workflow by setting up everything you need automatically:
The extension installs the TestDriver MCP server into your editor, enabling AI agents like GitHub Copilot to interact with TestDriver tools directly. It configures the server with TD_PREVIEW=ide so live test previews open inside VS Code instead of an external browser.
Copies a testdriver.agent.md file into .github/agents/ in your workspace. This file teaches GitHub Copilot how to use TestDriver — including how to provision sandboxes, find elements, make assertions, and write complete tests. It also sets up copilot-instructions.md if one doesn’t already exist.
Copies a library of TestDriver skills into .github/skills/. These are structured knowledge files that give AI coding agents detailed, context-aware documentation on every TestDriver feature — from clicking and typing to CI/CD setup, caching, secrets management, and more.
When a test runs, the extension opens a live preview panel inside VS Code showing a real-time view of the sandbox VM. You can watch your test execute step by step without leaving the editor. The panel title updates with the test status — [Running], [Passed], [Failed], or [Stopped].
The extension bundles the Vitest Explorer extension so your tests are automatically discovered and runnable from the VS Code test panel. During project setup, it scaffolds a vitest.config.js, an example test file, and installs vitest as a dev dependency.
Every TestDriver action (find, click, type, scroll, assert) returns rich visual UI to the AI agent’s chat. This includes annotated screenshots with element highlights, click markers, scroll indicators, confidence scores, and action timing — so the AI can see what happened after each step.
3

Chat with the TestDriver agent.

Selecting the testdriverai agentThe TestDriver agent has been trained on how to write tests using TestDriver. You can ask it to write tests for you, or to help you debug your existing tests.Note that TestDriver setup will add the TestDriver agent to .github/agents/copilot-instructions.md. However, if that file exists already, it will be written to .github/agents/testdriver.agent.md instead and you will need to select it as the active agent manually.Selecting the testdriverai agent