소스 정보
- 저장소
- testdriverai/testdriverai
- 최근 소스 활동
- 2026년 7월 29일 23:23
- 감지된 SKILL.md 언어
- 영어
- 스타
- 240
- 포크
- 36
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/testdriverai/testdriverai --skill testdriver-aws-setup명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | testdriver:aws-setup |
| description | Deploy TestDriver on your AWS infrastructure using CloudFormation |
This guide walks you through setting up self-hosted TestDriver instances on AWS. By the end, you'll have fully automated test infrastructure that spawns and terminates instances on-demand.
graph LR
A[Vitest Test] --> B[setup-aws hook]
B --> C[Spawns EC2]
C --> D[Runs Test]
D --> E[Terminates EC2]
TestDriver automatically manages AWS EC2 instances for your tests:
That's it! No manual instance management needed.
The setup process is simple:
setup-aws to automatically manage instance lifecycleTD_OS=windows with AWS credentials and instances spawn/terminate automaticallyBefore you begin, ensure you have:
aws configure)Our CloudFormation template creates all the AWS infrastructure you need:
<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:
- **Stack name**: `testdriver-infrastructure` (or your preferred name)
- **ProjectTag**: `testdriver`
- **AllowedIngressCidr**: Your IP range (e.g., `203.0.113.0/24`)
- **InstanceType**: `c5.xlarge` (recommended)
- **CreateKeyPair**: `true`
<Warning>
**Security**: Replace `AllowedIngressCidr` with your specific IP ranges to restrict VPC access. Avoid using `0.0.0.0/0` in production.
</Warning>
### Get Your Launch Template ID
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>
Download the template from the [TestDriver CLI repository](https://github.com/testdriverai/testdriverai/blob/main/setup/aws/cloudformation.yaml), then deploy:
```bash
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>
### Get Your Launch Template ID
After deployment completes, retrieve the launch template ID:
```bash
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>
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'],
},
});
**That's it!** The `setup-aws` hook automatically spawns and terminates instances when `TD_OS=windows` is set. No manual instance management needed.
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 Test", () => {
it("should run on self-hosted instance", async (context) => {
const testdriver = TestDriver(context, {
ip: context.ip || process.env.TD_IP,
});
await testdriver.provision.chrome({ url: "https://example.com" });
// ... your test steps
});
});
**How it works**: When `TD_OS=windows` with AWS credentials, `context.ip` is automatically set by the setup hook. When running without AWS setup (cloud-hosted), both are undefined and TestDriver uses the cloud. When `TD_IP` is provided manually, it takes precedence.
TD_OS=windows \
AWS_REGION=us-east-2 \
AWS_LAUNCH_TEMPLATE_ID=lt-xxx \
AMI_ID=ami-0504bf50fad62f312 \
vitest run
Each test gets its own fresh EC2 instance that's automatically terminated after completion.
Automate testing with self-hosted instances in your CI/CD pipeline. TestDriver automatically spawns a fresh instance for each test, runs the test, and terminates the instance.
name: TestDriver Self-Hosted Windows Tests
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run Windows tests with self-hosted instances
run: npx vitest run examples/*.test.mjs
env:
TD_API_KEY: ${{ secrets.TD_API_KEY
**Automatic Instance Management**: Setting `TD_OS=windows` with AWS credentials enables automatic instance spawning. Each test gets its own fresh instance that's terminated after the test completes.
| Secret | Description | Example |
|---|---|---|
AWS_ACCESS_KEY_ID | AWS access key | AKIAIOSFODNN7EXAMPLE |
AWS_SECRET_ACCESS_KEY | AWS secret key | wJalrXUtnFEMI/K7MDENG... |
AWS_REGION | AWS region | us-east-2 |
AWS_LAUNCH_TEMPLATE_ID | From CloudFormation output | lt-07c53ce8349b958d1 |
AMI_ID | TestDriver AMI ID | ami-0504bf50fad62f312 |
TD_API_KEY | Your TestDriver API key | From console.testdriver.ai |
For complete production examples, see:
If you already have a running instance, you can skip automatic spawning by providing TD_IP:
TD_OS=windows TD_IP=1.2.3.4 vitest run
The setup-aws hook will detect TD_IP is already set and skip spawning a new instance.
For advanced use cases, you can manually spawn instances using the spawn-runner.sh script:
AWS_REGION=us-east-2 \
AMI_ID=ami-0504bf50fad62f312 \
AWS_LAUNCH_TEMPLATE_ID=lt-xxx \
bash setup/aws/spawn-runner.sh
Output:
PUBLIC_IP=1.2.3.4
INSTANCE_ID=i-1234567890abcdef0
AWS_REGION=us-east-2
Then manually terminate when done:
aws ec2 terminate-instances \
--instance-ids i-1234567890abcdef0 \
--region us-east-2
For complete production examples, see:
You can connect to running instances via:
http://<public-ip>:5900The TestDriver Golden Image comes pre-configured with:
You can customize the AMI to include additional software or configurations:
Use the default credentials: - **Username**: `testdriver` - **Password**: `wwv9uJ0sqlulbN3` **Critical**: Run the password rotation script immediately: ```powershell C:\testdriver\RotateLocalPasswords.ps1 ``` Save the new password securely. Install any additional dependencies, configure settings, or modify the environment as needed. Use the AWS console or CLI to create an AMI from your modified instance. Update your workflow to use the new AMI ID. **Security**: Never use the default password in production. Always rotate passwords before creating custom AMIs.Use OIDC instead of long-term credentials for GitHub Actions:
permissions:
id-token: write
contents: read
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubActionsRole
aws-region: us-east-2
See GitHub's OIDC documentation for setup instructions.