How the TestDriver agent behaves on GitHub issues, pull requests, and @mentions
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Record test execution with video and logs
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Dashcam makes automatic video recordings. It also collects the logs for your tests. It captures screen recordings, application logs, and test details. You can review them later.
Most presets include Dashcam automatically:
import { test } from 'vitest';
import { chrome } from 'testdriverai/presets';
test('my test', async (context) => {
const { testdriver, dashcam } = await chrome(context, {
url: 'https://example.com'
});
// Test executes with recording automatically
await testdriver.find('login button').then(el => el.click());
// Dashcam URL available after test
console.log('Replay:', dashcam.url);
});
For more control, make a Dashcam instance directly:
import TestDriver from 'testdriverai';
import Dashcam from 'testdriverai/lib/core/Dashcam.js';
const client = await TestDriver.create({ os: 'linux' });
const dashcam = new Dashcam(client, {
apiKey: process.env.DASHCAM_API_KEY
});
await dashcam.auth();
await dashcam.start();
// Run your tests
const url = await dashcam.stop();
console.log('Replay URL:', url);
Create a new Dashcam instance:
new Dashcam(client, options)
<ParamField path="autoStart" type="boolean" default={false}>
Automatically start recording after authentication
</ParamField>
<ParamField path="logs" type="array" default={[]}>
Log configurations to add automatically
</ParamField>
</Expandable>
</ParamField>
Authenticate with Dashcam service:
await dashcam.auth(apiKey)
<ParamField path="apiKey" type="string" optional>
Override the API key set in constructor
</ParamField>
Returns: Promise<void>
Example:
await dashcam.auth('your-api-key');
Start recording:
await dashcam.start()
Returns: Promise<void>
Example:
await dashcam.start();
console.log('Recording started');
Stop recording and retrieve replay URL:
await dashcam.stop()
Returns: Promise<string|null> - Replay URL if available
Example:
const url = await dashcam.stop();
if (url) {
console.log('Watch replay:', url);
} else {
console.log('No replay URL available');
}
Track a log file in the recording:
await dashcam.addFileLog(path, name)
<ParamField path="path" type="string" required>
Path to the log file
</ParamField>
<ParamField path="name" type="string" required>
Display name for the log in Dashcam
</ParamField>
Returns: Promise<void>
Example:
// Linux/Mac
await dashcam.addFileLog('/tmp/app.log', 'Application Log');
// Windows
await dashcam.addFileLog('C:\\logs\\app.log', 'Application Log');
Track application-specific logs:
await dashcam.addApplicationLog(application, name)
<ParamField path="application" type="string" required>
Application name to track
</ParamField>
<ParamField path="name" type="string" required>
Display name for the log
</ParamField>
Returns: Promise<void>
Example:
await dashcam.addApplicationLog('Google Chrome', 'Browser Logs');
Track web request logs by URL pattern:
await dashcam.addWebLog(pattern, name)
<ParamField path="pattern" type="string" required>
URL pattern to match (e.g., `"*example.com*"`)
</ParamField>
<ParamField path="name" type="string" required>
Display name for the log
</ParamField>
Returns: Promise<void>
Example:
await dashcam.addWebLog('*example.com*', 'Web Logs');
Generic method to add any type of log:
await dashcam.addLog(config)
<ParamField path="config" type="object" required>
Log configuration
<Expandable title="config properties">
<ParamField path="name" type="string" required>
Display name for the log
</ParamField>
<ParamField path="type" type="string" required>
Log type: `'file'`, `'application'`, or `'web'`
</ParamField>
<ParamField path="path" type="string">
File path (required for type='file')
</ParamField>
<ParamField path="application" type="string">
Application name (required for type='application')
</ParamField>
<ParamField path="pattern" type="string">
URL pattern to match (required for type='web', e.g., `"*example.com*"`)
</ParamField>
</Expandable>
</ParamField>
Returns: Promise<void>
Example:
await dashcam.addLog({
name: 'Test Output',
type: 'file',
path: '/tmp/test.log'
});
await dashcam.addLog({
name: 'Chrome Logs',
type: 'application',
application: 'Google Chrome'
});
await dashcam.addLog({
name: 'Web Logs',
type: 'web',
pattern: '*example.com*'
});
Check if currently recording:
await dashcam.isRecording()
Returns: Promise<boolean> - True if recording is active
Example:
if (await dashcam.isRecording()) {
console.log('Recording in progress');
}
Current recording state:
dashcam.recording // boolean
Configured API key:
dashcam.apiKey // string
Associated TestDriver client:
dashcam.client // TestDriver instance
import { test } from 'vitest';
import TestDriver from 'testdriverai';
import Dashcam from 'testdriverai/lib/core/Dashcam.js';
test('record test execution', async () => {
const client = await TestDriver.create({ os: 'linux' });
const dashcam = new Dashcam(client);
await dashcam.auth();
await dashcam.start();
// Run your test
await client.find('button').then(el => el.click());
const url = await dashcam.stop();
console.log('Replay:', url);
await client.cleanup();
});
test('record with logs', async () => {
const client = await TestDriver.create({ os: 'linux' });
const dashcam = new Dashcam(client);
await dashcam.auth();
// Add log files before starting
await dashcam.addFileLog('/tmp/testdriver.log', 'TestDriver Log');
await dashcam.addFileLog('/tmp/app.log', 'Application Log');
await dashcam.start();
// Test execution
await client.find('login button').then(el => el.click());
const url = await dashcam.stop();
console.log('Replay with logs:', url);
await client.cleanup();
});
test('auto-start recording', async () => {
const client = await TestDriver.create({ os: 'linux' });
const dashcam = new Dashcam(client, {
autoStart: true,
logs: [
{
name: 'App Log',
type: 'file',
path: '/tmp/app.log'
}
]
});
await dashcam.auth(); // Automatically starts recording
// Test execution
await client.find('submit button').then(el => el.click());
const url = await dashcam.stop();
console.log('Replay:', url);
await client.cleanup();
});
import { chrome } from 'testdriverai/presets';
test('preset with dashcam', async (context) => {
const { testdriver, dashcam } = await chrome(context, {
url: 'https://example.com',
dashcam: true // Enabled by default
});
// Test runs with automatic recording
await testdriver.find('button').then(el => el.click());
// URL automatically available
console.log('Replay:', dashcam.url);
});
test('without dashcam', async (context) => {
const { testdriver } = await chrome(context, {
url: 'https://example.com',
dashcam: false // Disable recording
});
// Test runs without recording (faster)
await testdriver.find('button').then(el => el.click());
});
On Windows, Dashcam uses PowerShell commands and installs via npm:
// Windows-specific paths
await dashcam.addFileLog(
'C:\\Users\\testdriver\\Documents\\testdriver.log',
'TestDriver Log'
);
On Linux/Mac, Dashcam uses shell commands:
// Unix-specific paths
await dashcam.addFileLog('/tmp/testdriver.log', 'TestDriver Log');
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
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
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.