← ClaudeAtlas

testdriverquickstart-manuallisted

Add TestDriver to an existing project by hand.
testdriverai/testdriverai · ★ 243 · Testing & QA · score 72
Install: claude install-skill testdriverai/testdriverai
<!-- Generated from quickstart-manual.mdx. DO NOT EDIT. --> Add TestDriver to an existing project without the `init` scaffold. This is useful when you already have a Vitest setup or want full control over each file. <Tip> If you are starting from scratch, the [CLI quickstart](/quickstart-cli) does all of this for you with one command. </Tip> <Steps> <Step title="Get an API key"> <Card title="Get an API Key" icon="user-plus" href="https://console.testdriver.ai/settings" arrow horizontal > Start with 60 free device minutes, no credit card required. </Card> Save the key in a `.env` file at your project root. The SDK loads it automatically: ```bash .env TD_API_KEY=your_api_key ``` Add `.env` to `.gitignore` so the key is not committed. </Step> <Step title="Install dependencies"> Install Vitest and TestDriver as dev dependencies: ```bash npm install --save-dev vitest testdriverai ``` <Note> TestDriver requires Node.js 20.19 or later and only runs on [Vitest](https://vitest.dev). Jest, Mocha, and other runners are not supported. </Note> </Step> <Step title="Configure Vitest"> Create `vitest.config.js` at your project root (or add these settings to an existing one): ```js vitest.config.js import { defineConfig } from 'vitest/config'; import TestDriver from 'testdriverai/vitest'; export default defineConfig({ test: { // Sandboxes t