- Signs you in.
- Sets up your project and MCP server.
- Opens the live preview automatically whenever a test runs.
Before you begin
- VS Code 1.85 or later with GitHub Copilot, or Cursor.
- Node.js 20.19 or later, which runs the MCP server and your tests.
- A workspace folder open in the editor, since the extension sets up TestDriver in it.
1
Install the extension
Install TestDriver.ai from the VS Code Marketplace, or search for TestDriver.ai in the Extensions view.In Cursor, the extension may not appear in search. If so, download it with Download Extension on the Marketplace page. Then run Extensions: Install from VSIX from the Command Palette and choose the file.
2
Sign in
Run TestDriver: Sign In from the Command Palette. It opens your browser, signs you in to TestDriver, and saves your API key in the editor.
3
Set up your project
Run TestDriver: Initialize Project. It writes your API key to
.env and runs npx testdriverai init, which installs the SDK and adds:- An example test
- The TestDriver agent and skills
- A Vitest config
- A GitHub Actions workflow
4
Connect the MCP server
Run TestDriver: Install MCP Server and choose where to save it:
.vscode/mcp.json for VS Code or .cursor/mcp.json for Cursor.If it asks whether to overwrite an existing TestDriver entry, choose Yes. This version of the config turns on the live preview panel.5
Write your first test
In VS Code, run TestDriver: Chat with Agent. It opens Copilot chat with the TestDriver agent and a sample prompt.In Cursor, open the chat and ask:The live preview panel opens as the agent starts the sandbox. The agent writes the test under
tests/ as it goes.Extension commands
The preview panel opens automatically when a test starts. To turn that off, set
testdriverai.autoOpenPreview to false in your settings.
Next steps
Generate tests with AI
Prompt the agent and steer it while it works.
Run tests
Run tests from the editor or the terminal.
Make assertions
Check whatβs on screen in plain language.
Run in CI/CD
Run your tests on every pull request.

