Install any skill in seconds. Free to start, no credit card required.
Get Started Free →testdriverai/testdriver:caching
How TestDriver learns your app and caches what it discovers for instant, deterministic replays
Passed 20 of 20 test cases with the skill, and 7 of 20 without it.
and 16 more in the full report
14 fixed8 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 12 test cases the skill fixed. Same model, same prompt, with and without the skill.
When calling `await testdriver.find('submit button')` without providing any custom options object, what is the default visual similarity percentage requirement enforced by TestDriver?
| Checked | Without skill | With skill |
|---|---|---|
| The response identifies 95% visual similarity as the default threshold. | Missed | Passed |
The instructions your model reads when the skill loads.
After the agent explored your app, TestDriver keeps what it found. TestDriver caches each element that the AI vision agent finds. It uses a vision fingerprint. This is a perceptual hash of the screen state at the element location. On the next run, TestDriver matches against that cache. It does not call the AI again. Tests that pass replay quickly, in the same way each time, and at a low cost.
This learning makes TestDriver fast. The cache makes the test run a maximum of 1.7x faster. It does not do the same AI vision analysis again. The agent thinks only when it sees something new.
// First run: builds cache
await testdriver.find('submit button');
// Second run: exact match
await testdriver.find('submit button');
TestDriver enables learning automatically. You do not need configuration. TestDriver computes the cache key from these. The cache key is the fingerprint that TestDriver uses to know what it learned:
find()When you change your test file, the hash changes automatically. This makes the old cache entries not valid. Then TestDriver does a new AI analysis with your new 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 ⚡
test cases passed, vs 7 / 20 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.