TestDriver.ai VSCode Extension
February 17, 2026 ยท View on GitHub
AI-powered end-to-end testing with live preview directly in your IDE.
Features
- Live Test Preview: Watch your tests execute in real-time within VSCode
- MCP Integration: Automatic MCP server setup for AI-assisted test creation
- Seamless Workflow: Tests automatically open in a side panel when running
Installation
From Marketplace
Search for "TestDriver.ai" in the VSCode Extensions marketplace.
From VSIX
- Download the
.vsixfile from releases - In VSCode, press
Cmd+Shift+P(Mac) orCtrl+Shift+P(Windows/Linux) - Type "Install from VSIX" and select the downloaded file
Getting Started
- Install this extension
- Get an API key at console.testdriver.ai
- Set your
TD_API_KEYenvironment variable - Install the MCP server via Command Palette: TestDriver: Install MCP Server
- Run a test with
preview: "ide"to see live execution
Usage
Live Preview
When running tests with the TestDriver SDK, set the preview option to "ide":
import { TestDriver } from 'testdriverai/lib/vitest/hooks.mjs';
describe('My Test Suite', () => {
it('runs my test', async (context) => {
const testdriver = TestDriver(context, {
preview: 'ide' // Opens live preview in IDE panel
});
await testdriver.provision.chrome({ url: 'https://example.com' });
await testdriver.find('Sign In button').click();
});
});
Preview Options
| Value | Description |
|---|---|
"browser" | Opens debugger in default browser (default) |
"ide" | Opens debugger in IDE panel (VSCode, Cursor, etc.) |
"none" | Headless mode, no preview |
MCP Server
The extension can automatically install the TestDriver MCP server for AI-assisted test creation:
- Press
Cmd+Shift+P(Mac) orCtrl+Shift+P(Windows/Linux) - Type "TestDriver: Install MCP Server"
- Choose where to save the configuration
Or accept the prompt when the extension first activates.
Note: When installed via this extension, the MCP server automatically uses IDE preview mode (TD_PREVIEW=ide), so the live test execution view opens directly in the IDE panel instead of an external browser.
Commands
| Command | Description |
|---|---|
TestDriver: Open Live Preview | Manually open the preview panel |
TestDriver: Close Live Preview | Close all preview panels |
TestDriver: Install MCP Server | Install MCP server configuration |
Configuration
| Setting | Default | Description |
|---|---|---|
testdriverai.autoOpenPreview | true | Auto-open preview when test starts |
testdriverai.mcpServerPath | "" | Custom MCP server path |
Requirements
- VSCode 1.85.0 or later
- TestDriver.ai SDK installed in your project
- Valid TestDriver API key
Development
npm install
npm run compile
Press F5 in VSCode to launch the Extension Development Host.
License
MIT License - see LICENSE file for details.