소스 정보
- 저장소
- 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-caching명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | testdriver:caching |
| description | 1.7x faster test execution with intelligent caching and optimization |
TestDriver is engineered for performance with intelligent caching that delivers up to 1.7x faster test execution by skipping redundant AI vision analysis.
// First run: builds cache
await testdriver.find('submit button');
// Second run: exact match
await testdriver.find('submit button');
Caching is enabled automatically with zero configuration. The cache key is computed from:
find()When you modify your test file, the hash changes automatically, invalidating stale cache entries and ensuring fresh AI analysis with your updated test logic.
import { test } from 'vitest';
import { chrome } from 'testdriverai/presets';
test('auto-cached test', async (context) => {
const { testdriver } = await chrome(context, {
url: 'https://example.com'
});
// First call: AI analyzes screen, saves to cache
await testdriver.find('More information link'); // 2.1s
// Second call: cache hit, instant response
await testdriver.find('More information link'); // 12ms ⚡
});
You can clear the cache within the TestDriver console. There, you'll also find previews of cached elements, the input prompts, as well as analytics on cache hit rates.
Manage and clear your test cache from the TestDriver console.You can track cache performance in your tests:
test('monitor cache performance', async (context) => {
const { testdriver } = await chrome(context, { url });
const element = await testdriver.find('submit button');
if (element.cacheHit) {
console.log('✅ Cache hit - instant response');
console.log('Strategy:', element.cacheStrategy); // 'exact', 'pixeldiff', or 'template'
console.log('Similarity:', `${(element.similarity * 100).toFixed(1)}%`);
console.log('Cache age:', element.cacheCreatedAt);
} else {
console.log('⏱️ Cache miss - AI analysis performed');
console.log('New cache entry created');
}
});
You can configure cache behavior globally when initializing TestDriver:
import { TestDriver } from 'testdriverai';
const testdriver = new TestDriver({
apiKey: process.env.TD_API_KEY,
cacheKey: 'my-test-suite', // cache-key for this instance
cacheDefaults: {
threshold: 0.05, // 95% similarity
}
});
It's also possible to override cache settings per find() call:
// Default: 95% similarity required
await testdriver.find('submit button');
// Explicit strict threshold
await testdriver.find('submit button', {
cacheThreshold: 0.01 // 99% similarity
});
Custom cache keys prevent cache pollution when using variables in prompts, dramatically improving cache hit rates.
// ❌ Without cache key - creates new cache for each variable value
const email = 'user@example.com';
await testdriver.find(`input for ${email}`); // Cache miss every time
// ✅ With cache key - reuses cache regardless of variable
const email = 'user@example.com';
await testdriver.find(`input for ${email}`, {
cacheKey: 'email-input'
});
// Also useful for dynamic IDs, names, or other changing data
const orderId = generateOrderId();
await testdriver.find(`order ${orderId} status`, {
cacheKey: 'order-status' // Same cache for all orders
});