How the TestDriver agent behaves on GitHub issues, pull requests, and @mentions
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use dynamic data and secure secrets in your tests
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Make your tests larger with dynamic data and secure secrets. Select the correct method for your test needs.
Use environment variables for configuration that changes between environments (dev, staging, production). Also use them for secrets that you must not commit to the code. Use this method when you must run the same tests against different servers or with different credentials.
import { test } from 'vitest';
import { chrome } from 'testdriverai/presets';
test('multi-environment testing', async (context) => {
const env = process.env.TEST_ENV || 'staging';
const urls = {
dev: 'https://dev.myapp.com',
staging: 'https://staging.myapp.com',
production: 'https://myapp.com'
};
const { testdriver } = await chrome(context, {
url: urls[env]
});
await testdriver.assert('app is running');
});
# Run against different environments
TEST_ENV=dev vitest run
TEST_ENV=staging vitest run
TEST_ENV=production vitest run
Test fixtures work best when you have structured, reusable test data that needs to be shared across multiple tests. Use fixtures when testing different user roles, product catalogs, or any scenario where you want to parameterize tests with a known set of data.
export const testUsers = [
{ email: 'admin@test.com', role: 'admin' },
{ email: 'user@test.com', role: 'user' },
{ email: 'guest@test.com', role: 'guest' }
];
export const products = [
{ name: 'Laptop', price: 999 },
{ name: 'Mouse', price: 29 },
{ name: 'Keyboard', price: 89 }
];
import { test } from 'vitest';
import { chrome } from 'testdriverai/presets';
import { testUsers } from './fixtures/users.js';
test.each(testUsers)('$role can access dashboard', async ({ email, role }, context) => {
const { testdriver } = await chrome(context, { url });
await testdriver.find('email input').type(email);
await testdriver.find('password input').type('password123');
await testdriver.find('login button').click();
if (role === 'admin') {
await testdriver.assert('admin panel is visible');
} else {
await testdriver.assert('user dashboard is visible');
}
});
Dynamic data generation is perfect for creating unique test data on each run, avoiding conflicts with existing records, and testing edge cases with realistic data. Use libraries like Faker when you need fresh emails, names, or other data that won't collide with previous test runs.
import { test } from 'vitest';
import { chrome } from 'testdriverai/presets';
import { faker } from '@faker-js/faker';
test('user registration with dynamic data', async (context) => {
const { testdriver } = await chrome(context, { url });
// Generate unique test data for each run
const userData = {
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
email: faker.internet.email(),
password: faker.internet.password({ length: 12 })
};
await testdriver.find('first name input').type(userData.firstName);
await testdriver.find('last name input').type(userData.lastName);
await testdriver.find('email input').type(userData.email);
await testdriver.find('password input').type(userData.password);
await testdriver.find('register button').click();
await testdriver.assert('registration successful');
console.log('Registered user:', userData.email);
});
npm install --save-dev @faker-js/faker
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
How the TestDriver agent behaves on GitHub issues, pull requests, and @mentions
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Execute natural language tasks using AI
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Make AI-powered assertions about screen state
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Deploy TestDriver on your AWS infrastructure using CloudFormation
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Speed up tests with screenshot-based caching
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
How TestDriver learns your app and caches what it discovers for instant, deterministic replays
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.