testdriver-agent
How the TestDriver agent behaves on GitHub issues, pull requests, and @mentions
Deploy TestDriver on your AWS infrastructure using CloudFormation
Claude Code
$ npx -y skills add testdriverai/testdriverai --skill testdriver-aws-setup --agent claude-code
Codex
$ npx skills add testdriverai/testdriverai --skill testdriver-aws-setup -a codex -y
Cursor
$ npx skills add testdriverai/testdriverai --skill testdriver-aws-setup -a cursor -y
Gemini CLI
$ npx skills add testdriverai/testdriverai --skill testdriver-aws-setup -a gemini-cli -y
GitHub Copilot
$ npx skills add testdriverai/testdriverai --skill testdriver-aws-setup -a github-copilot -y
OpenCode
$ npx skills add testdriverai/testdriverai --skill testdriver-aws-setup -a opencode -y
Windsurf
$ npx skills add testdriverai/testdriverai --skill testdriver-aws-setup -a windsurf -y
name: testdriver:aws-setup description: Deploy TestDriver on your AWS infrastructure using CloudFormation
<!-- Generated from aws-setup.mdx. DO NOT EDIT. -->
This guide helps you to set up self-hosted TestDriver instances on AWS. At the end, you have automated test infrastructure. It starts and stops instances when you need them.
graph LR
A[Vitest Test] --> B[setup-aws hook]
B --> C[Spawns EC2]
C --> D[Runs Test]
D --> E[Terminates EC2]TestDriver manages the AWS EC2 instances for your tests automatically:
1. **Deploy CloudFormation**. Set up the infrastructure one time. 2. **Configure Vitest**. Add one line to your config. 3. **Run Tests**. The instances start automatically, run the tests, and stop.
That is all. You do not need to manage the instances by hand.
<Steps> <Step title="Deploy Infrastructure"> <Card title="Launch CloudFormation Stack" icon="aws" href="https://console.aws.amazon.com/cloudformation/home#/stacks/create/review?templateURL=https://v7-cloudformation-template.s3.us-east-2.amazonaws.com/cloudformation.yaml" horizontal arrow > One-click AWS setup </Card> </Step>
<Step title="Add to Vitest Config">
setupFiles: ['testdriverai/vitest/setup', 'testdriverai/vitest/setup-aws']
</Step>
<Step title="Run Tests">
TD_OS=windows AWS_REGION=us-east-2 \
AWS_LAUNCH_TEMPLATE_ID=lt-xxx AMI_ID=ami-xxx \
vitest run</Step> </Steps>
The setup process is simple:
1. **Deploy CloudFormation** — Creates VPC, security groups, IAM roles, and launch templates 2. **Configure Vitest** — Add `setup-aws` to automatically manage instance lifecycle 3. **Run Tests** — Set `TD_OS=windows` with AWS credentials and instances spawn/terminate automatically
Before you begin, ensure you have:
<Tip> The TestDriver Golden Image AMI ID is `ami-0504bf50fad62f312`. Contact us to get access in your preferred AWS region. </Tip>
Our CloudFormation template creates all the AWS infrastructure you need:
<Tabs> <Tab title="GUI"> Click the button below to launch the CloudFormation stack in your AWS Console:
<Card title="Launch Stack" icon="aws" href="https://console.aws.amazon.com/cloudformation/home#/stacks/create/review?templateURL=https://v7-cloudformation-template.s3.us-east-2.amazonaws.com/cloudformation.yaml" horizontal arrow > Deploy TestDriver infrastructure with one click </Card>
Configure the stack parameters:
<Warning> **Security**: Replace `AllowedIngressCidr` with your specific IP ranges to restrict VPC access. Avoid using `0.0.0.0/0` in production. </Warning>
After the stack creation completes, navigate to the **Outputs** tab to find your `LaunchTemplateId`:

<Tip> **Save this ID** — you'll need it for spawning instances and CI configuration. </Tip> </Tab> <Tab title="CLI"> Download the template from the [TestDriver CLI repository](https://github.com/testdriverai/testdriverai/blob/main/setup/aws/cloudformation.yaml), then deploy:
aws cloudformation deploy \
--template-file setup/aws/cloudformation.yaml \
--stack-name testdriver-infrastructure \
--parameter-overrides \
ProjectTag=testdriver \
AllowedIngressCidr=0.0.0.0/0 \
InstanceType=c5.xlarge \
CreateKeyPair=true \
--capabilities CAPABILITY_IAM<Warning> **Security**: Replace `AllowedIngressCidr=0.0.0.0/0` with your specific IP ranges to restrict VPC access. </Warning>
After deployment completes, retrieve the launch template ID:
aws cloudformation describe-stacks \
--stack-name testdriver-infrastructure \
--query 'Stacks[0].Outputs[?OutputKey==`LaunchTemplateId`].OutputValue' \
--output text<Tip> **Save this ID** — you'll need it for spawning instances and CI configuration. </Tip> </Tab> </Tabs>
Add the AWS setup hook to your `vitest.config.mjs`:
import { defineConfig } from 'vitest/config';
import { config } from 'dotenv';
import TestDriver from 'testdriverai/vitest';
config(); // Load .env file
export default defineConfig({
test: {
testTimeout: 900000,
hookTimeout: 900000,
maxConcurrency: 3,
reporters: [
'default',
TestDriver(),
['junit', { outputFile: 'test-report.junit.xml' }]
],
setupFiles: ['testdriverai/vitest/setup', 'testdriverai/vitest/setup-aws'],
},
});<Note> **That's it!** The `setup-aws` hook automatically spawns and terminates instances when `TD_OS=windows` is set. No manual instance management needed. </Note>
Tests should use `context.ip || process.env.TD_IP` for the IP configuration:
import { describe, it } from "vitest";
import { TestDriver } from "testdriverai/vitest/hooks";
describe("My TesHow the TestDriver agent behaves on GitHub issues, pull requests, and @mentions
How TestDriver learns your app and caches what it discovers for instant, deterministic replays
Produce the "Playwright 1.xx API Review" artifact for a range of commits - the public API additions and the breaking or behavior…
Write, refine, run, and QA promptfoo evaluation suites: promptfooconfig.yaml, prompts, providers, vars, tests, assertions,…
DeepEval evaluation workflow for AI agents and LLM applications. TRIGGER when the user wants to evaluate or improve an AI agent,…