@testdriverai/mcp 7.11.136-test → 7.11.138-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/skills/testdriver-assert/SKILL.md +5 -5
- package/ai/skills/testdriver-caching/SKILL.md +2 -2
- package/ai/skills/testdriver-changelog/SKILL.md +186 -0
- package/ai/skills/testdriver-claude-mcp-plugin/SKILL.md +208 -0
- package/ai/skills/testdriver-click/SKILL.md +13 -13
- package/ai/skills/testdriver-client/SKILL.md +1 -1
- package/ai/skills/testdriver-debugging-with-screenshots/SKILL.md +5 -5
- package/ai/skills/testdriver-double-click/SKILL.md +7 -7
- package/ai/skills/testdriver-enterprise/SKILL.md +1 -1
- package/ai/skills/testdriver-events/SKILL.md +1 -1
- package/ai/skills/testdriver-exec/SKILL.md +10 -10
- package/ai/skills/testdriver-extract/SKILL.md +6 -6
- package/ai/skills/testdriver-find/SKILL.md +61 -61
- package/ai/skills/testdriver-focus-application/SKILL.md +6 -6
- package/ai/skills/testdriver-generating-tests/SKILL.md +3 -3
- package/ai/skills/testdriver-hosted/SKILL.md +3 -3
- package/ai/skills/testdriver-hover/SKILL.md +6 -6
- package/ai/skills/testdriver-making-assertions/SKILL.md +2 -2
- package/ai/skills/testdriver-mouse-down/SKILL.md +9 -9
- package/ai/skills/testdriver-mouse-up/SKILL.md +9 -9
- package/ai/skills/testdriver-parse/SKILL.md +4 -4
- package/ai/skills/testdriver-performing-actions/SKILL.md +4 -4
- package/ai/skills/testdriver-press-keys/SKILL.md +5 -5
- package/ai/skills/testdriver-quickstart/SKILL.md +51 -54
- package/ai/skills/testdriver-redraw/SKILL.md +1 -1
- package/ai/skills/testdriver-right-click/SKILL.md +7 -7
- package/ai/skills/testdriver-screenshot/SKILL.md +9 -9
- package/ai/skills/testdriver-scroll/SKILL.md +13 -13
- package/ai/skills/testdriver-self-hosted/SKILL.md +1 -1
- package/ai/skills/testdriver-type/SKILL.md +7 -7
- package/ai/skills/testdriver-wait/SKILL.md +5 -5
- package/ai/skills/testdriver-what-is-testdriver/SKILL.md +11 -11
- package/docs/{v7/_drafts → _drafts}/agents.mdx +1 -1
- package/docs/{v7/_drafts → _drafts}/best-practices.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/caching-selectors.mdx +3 -3
- package/docs/{v7/_drafts → _drafts}/configuration.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/debugging.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/error-handling.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/faq.mdx +7 -7
- package/docs/{v7/_drafts → _drafts}/installation.mdx +2 -2
- package/docs/{v7/_drafts → _drafts}/migration.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/observable.mdx +3 -3
- package/docs/{v7/_drafts → _drafts}/powerful.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/readme.mdx +11 -11
- package/docs/{v7/_drafts → _drafts}/reports.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/scalable.mdx +10 -10
- package/docs/{v7/_drafts → _drafts}/troubleshooting.mdx +4 -4
- package/docs/{v7/_drafts → _drafts}/vitest-plugin.mdx +2 -2
- package/docs/{v7/_drafts → _drafts}/vitest.mdx +9 -9
- package/docs/_scripts/generate-examples.js +9 -10
- package/docs/_scripts/generate-skills.js +4 -4
- package/docs/{v7/agent.mdx → agent.mdx} +17 -17
- package/docs/{v7/assert.mdx → assert.mdx} +5 -5
- package/docs/{v7/aws-setup.mdx → aws-setup.mdx} +6 -6
- package/docs/{v7/cache.mdx → cache.mdx} +9 -9
- package/docs/{v7/caching.mdx → caching.mdx} +13 -12
- package/docs/{v7/captcha.mdx → captcha.mdx} +7 -7
- package/docs/changelog.mdx +13 -13
- package/docs/{v7/ci-cd.mdx → ci-cd.mdx} +10 -10
- package/docs/{v7/click.mdx → click.mdx} +13 -13
- package/docs/client.mdx +323 -0
- package/docs/{v7/copilot → copilot}/auto-healing.mdx +2 -2
- package/docs/{v7/copilot → copilot}/running-tests.mdx +8 -8
- package/docs/{v7/customizing-devices.mdx → customizing-devices.mdx} +1 -1
- package/docs/{v7/dashcam.mdx → dashcam.mdx} +3 -3
- package/docs/{v7/debugging-with-screenshots.mdx → debugging-with-screenshots.mdx} +12 -12
- package/docs/docs.json +429 -288
- package/docs/{v7/double-click.mdx → double-click.mdx} +7 -7
- package/docs/{v7/elements.mdx → elements.mdx} +7 -7
- package/docs/{v7/enterprise.mdx → enterprise.mdx} +2 -2
- package/docs/{v7/errors.mdx → errors.mdx} +3 -3
- package/docs/{v7/events.mdx → events.mdx} +4 -4
- package/docs/{v7/exec.mdx → exec.mdx} +10 -10
- package/docs/{v7/extract.mdx → extract.mdx} +10 -10
- package/docs/{v7/find.mdx → find.mdx} +61 -61
- package/docs/{v7/focus-application.mdx → focus-application.mdx} +6 -6
- package/docs/{v7/generating-tests.mdx → generating-tests.mdx} +10 -10
- package/docs/guide/best-practices-polling.mdx +6 -1
- package/docs/{v7/hosted.mdx → hosted.mdx} +7 -7
- package/docs/{v7/hover.mdx → hover.mdx} +6 -6
- package/docs/interacting-with-your-app.mdx +198 -0
- package/docs/locating-elements.mdx +423 -0
- package/docs/{v7/making-assertions.mdx → making-assertions.mdx} +7 -7
- package/docs/{v7/mouse-down.mdx → mouse-down.mdx} +9 -9
- package/docs/{v7/mouse-up.mdx → mouse-up.mdx} +9 -9
- package/docs/options.mdx +320 -0
- package/docs/{v7/parse.mdx → parse.mdx} +12 -12
- package/docs/{v7/performing-actions.mdx → performing-actions.mdx} +11 -11
- package/docs/{v7/press-keys.mdx → press-keys.mdx} +5 -5
- package/docs/{v7/provision.mdx → provision.mdx} +9 -9
- package/docs/quickstart-cli.mdx +437 -0
- package/docs/quickstart-github.mdx +54 -0
- package/docs/quickstart-manual.mdx +135 -0
- package/docs/quickstart.mdx +22 -0
- package/docs/{v7/redraw.mdx → redraw.mdx} +7 -7
- package/docs/{v7/reusable-code.mdx → reusable-code.mdx} +3 -3
- package/docs/{v7/right-click.mdx → right-click.mdx} +7 -7
- package/docs/{v7/screenshot.mdx → screenshot.mdx} +9 -9
- package/docs/{v7/screenshots.mdx → screenshots.mdx} +3 -3
- package/docs/{v7/scroll.mdx → scroll.mdx} +13 -13
- package/docs/{v7/secrets.mdx → secrets.mdx} +4 -4
- package/docs/{v7/self-hosted.mdx → self-hosted.mdx} +7 -7
- package/docs/{v7/test-results-json.mdx → test-results-json.mdx} +4 -4
- package/docs/{v7/type.mdx → type.mdx} +7 -7
- package/docs/{v7/variables.mdx → variables.mdx} +2 -2
- package/docs/{v7/wait.mdx → wait.mdx} +5 -5
- package/docs/what-is-testdriver.mdx +54 -0
- package/lib/environments.json +1 -1
- package/lib/github-comment.mjs +2 -3
- package/package.json +1 -1
- package/scripts/generate-skills.js +1 -1
- package/docs/v7/client.mdx +0 -486
- package/docs/v7/quickstart.mdx +0 -451
- package/docs/v7/what-is-testdriver.mdx +0 -54
- /package/docs/{v7/_drafts → _drafts}/architecture.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/auto-cache-key.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/awesome-logs-quick-ref.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/cli-to-sdk-migration.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/assert.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/exec.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/focus-application.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/hover-image.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/hover-text.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/if.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/match-image.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/press-keys.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/remember.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/run.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/scroll-until-image.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/scroll-until-text.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/scroll.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/type.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/wait-for-image.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/wait-for-text.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/commands/wait.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/contributing.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/dashcam-title-feature.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/hooks.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/init-command.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/playwright.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/plugin-migration.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/presets.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/progressive-disclosure.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/provision.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/quick-start-test-recording.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/screenshot.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/sdk-awesome-logs.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/sdk-browser-rendering.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/sdk-migration.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/sdk-v7-complete.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/self-hosting.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/test-recording.mdx +0 -0
- /package/docs/{v7/_drafts → _drafts}/writing-tests.mdx +0 -0
- /package/docs/{v7/examples → examples}/ai.mdx +0 -0
- /package/docs/{v7/examples → examples}/assert.mdx +0 -0
- /package/docs/{v7/examples → examples}/captcha-api.mdx +0 -0
- /package/docs/{v7/examples → examples}/chrome-extension.mdx +0 -0
- /package/docs/{v7/examples → examples}/drag-and-drop.mdx +0 -0
- /package/docs/{v7/examples → examples}/element-not-found.mdx +0 -0
- /package/docs/{v7/examples → examples}/findall-coffee-icons.mdx +0 -0
- /package/docs/{v7/examples → examples}/formatted-logging.mdx +0 -0
- /package/docs/{v7/examples → examples}/hover-image.mdx +0 -0
- /package/docs/{v7/examples → examples}/hover-text-with-description.mdx +0 -0
- /package/docs/{v7/examples → examples}/hover-text.mdx +0 -0
- /package/docs/{v7/examples → examples}/installer.mdx +0 -0
- /package/docs/{v7/examples → examples}/launch-vscode-linux.mdx +0 -0
- /package/docs/{v7/examples → examples}/match-image.mdx +0 -0
- /package/docs/{v7/examples → examples}/parse.mdx +0 -0
- /package/docs/{v7/examples → examples}/press-keys.mdx +0 -0
- /package/docs/{v7/examples → examples}/scroll-keyboard.mdx +0 -0
- /package/docs/{v7/examples → examples}/scroll-until-text.mdx +0 -0
- /package/docs/{v7/examples → examples}/scroll.mdx +0 -0
- /package/docs/{v7/examples → examples}/type.mdx +0 -0
- /package/docs/{v7/mcp.mdx → mcp.mdx} +0 -0
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "The TestDriver Agent"
|
|
3
|
-
sidebarTitle: "
|
|
3
|
+
sidebarTitle: "Introduction"
|
|
4
4
|
description: "How the TestDriver agent behaves on GitHub issues, pull requests, and @mentions"
|
|
5
|
-
icon: "
|
|
5
|
+
icon: "hand-horns"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
The TestDriver agent is an AI teammate
|
|
9
|
-
**code review that runs your app
|
|
10
|
-
what
|
|
11
|
-
|
|
8
|
+
The TestDriver agent is an AI teammate in your GitHub repository. It is
|
|
9
|
+
**code review that runs your app**. It does not only read a diff and guess
|
|
10
|
+
what can break. It starts a real sandbox, controls the real app, and reports what
|
|
11
|
+
really happens.
|
|
12
12
|
|
|
13
13
|
## Scope: it only builds and maintains tests
|
|
14
14
|
|
|
15
|
-
The agent
|
|
16
|
-
automated tests** with TestDriver
|
|
17
|
-
a test against the change. It
|
|
18
|
-
your application code, fix product bugs, answer
|
|
15
|
+
The agent has one purpose. It does one thing: it **writes, debugs, fixes, and keeps
|
|
16
|
+
automated tests** with TestDriver. It reviews pull requests. It writes and runs
|
|
17
|
+
a test against the change. It does not do work that is not in scope. It does not edit
|
|
18
|
+
your application code, fix product bugs, answer other programming questions, or
|
|
19
19
|
act as a general coding assistant.
|
|
20
20
|
|
|
21
21
|
## How it behaves depends on the surface
|
|
22
22
|
|
|
23
|
-
The agent reacts to three different GitHub surfaces
|
|
24
|
-
|
|
23
|
+
The agent reacts to three different GitHub surfaces. Its behavior is
|
|
24
|
+
different on each one.
|
|
25
25
|
|
|
26
26
|
| Surface | Trigger | What it does |
|
|
27
27
|
|---------|---------|--------------|
|
|
@@ -31,13 +31,13 @@ noticeably different on each.
|
|
|
31
31
|
|
|
32
32
|
## Pull requests — automatic code review
|
|
33
33
|
|
|
34
|
-
When a pull request is **opened**, the agent reviews it automatically
|
|
34
|
+
When a pull request is **opened**, the agent reviews it automatically. Nobody has
|
|
35
35
|
to ask.
|
|
36
36
|
|
|
37
|
-
- **The review is the deliverable, not chatter.**
|
|
38
|
-
|
|
39
|
-
comment** at the end
|
|
40
|
-
|
|
37
|
+
- **The review is the deliverable, not chatter.** No person asks for an automatic review.
|
|
38
|
+
Thus the agent stays quiet while it works. It posts a **single review
|
|
39
|
+
comment** at the end. It does not put many inline threads across the diff. It does not
|
|
40
|
+
tell each step.
|
|
41
41
|
- **It runs the change when it can.** Its default first move is to start a session,
|
|
42
42
|
work out what the PR changes from a user's point of view, and write and run a
|
|
43
43
|
TestDriver test that exercises exactly that. A bug it *watched happen* is far
|
|
@@ -7,7 +7,7 @@ icon: "check-circle"
|
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
Make
|
|
10
|
+
Make assertions about the screen state with natural language and AI. The AI examines the screen. It makes sure that your assertion is true.
|
|
11
11
|
|
|
12
12
|
## Syntax
|
|
13
13
|
|
|
@@ -54,7 +54,7 @@ await testdriver.assert(assertion, options)
|
|
|
54
54
|
|
|
55
55
|
## Returns
|
|
56
56
|
|
|
57
|
-
`Promise<boolean>` - `true` if assertion passes
|
|
57
|
+
`Promise<boolean>` - `true` if the assertion passes. It throws an error if the assertion fails.
|
|
58
58
|
|
|
59
59
|
## Examples
|
|
60
60
|
|
|
@@ -101,7 +101,7 @@ await testdriver.assert('the modal dialog is open');
|
|
|
101
101
|
<Check>
|
|
102
102
|
**Assert state changes**
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
Make sure of the state before and after actions:
|
|
105
105
|
|
|
106
106
|
```javascript
|
|
107
107
|
// Before
|
|
@@ -311,5 +311,5 @@ describe('Assertions', () => {
|
|
|
311
311
|
|
|
312
312
|
## Related Methods
|
|
313
313
|
|
|
314
|
-
- [`extract()`](/
|
|
315
|
-
- [`find()`](/
|
|
314
|
+
- [`extract()`](/extract) - Extract information for detailed assertions
|
|
315
|
+
- [`find()`](/find) - Locate elements to verify
|
|
@@ -5,7 +5,7 @@ description: "Deploy TestDriver on your AWS infrastructure using CloudFormation"
|
|
|
5
5
|
icon: "aws"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
This guide
|
|
8
|
+
This guide helps you to set up self-hosted TestDriver instances on AWS. At the end, you have automated test infrastructure. It starts and stops instances when you need them.
|
|
9
9
|
|
|
10
10
|
```mermaid
|
|
11
11
|
graph LR
|
|
@@ -17,13 +17,13 @@ graph LR
|
|
|
17
17
|
|
|
18
18
|
## How It Works
|
|
19
19
|
|
|
20
|
-
TestDriver
|
|
20
|
+
TestDriver manages the AWS EC2 instances for your tests automatically:
|
|
21
21
|
|
|
22
|
-
1. **Deploy CloudFormation
|
|
23
|
-
2. **Configure Vitest
|
|
24
|
-
3. **Run Tests
|
|
22
|
+
1. **Deploy CloudFormation**. Set up the infrastructure one time.
|
|
23
|
+
2. **Configure Vitest**. Add one line to your config.
|
|
24
|
+
3. **Run Tests**. The instances start automatically, run the tests, and stop.
|
|
25
25
|
|
|
26
|
-
That
|
|
26
|
+
That is all. You do not need to manage the instances by hand.
|
|
27
27
|
|
|
28
28
|
# Quickstart
|
|
29
29
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Cache"
|
|
3
|
-
sidebarTitle: "Cache"
|
|
3
|
+
sidebarTitle: "Configuring the Cache"
|
|
4
4
|
description: "Speed up tests with screenshot-based caching"
|
|
5
5
|
icon: "bolt-lightning"
|
|
6
6
|
mode: "wide"
|
|
@@ -8,18 +8,18 @@ mode: "wide"
|
|
|
8
8
|
|
|
9
9
|
## Overview
|
|
10
10
|
|
|
11
|
-
The cache system
|
|
11
|
+
The cache system makes repeated test runs faster. It compares screenshots to cached results. When the screen did not change much, TestDriver uses the cached element positions again. It does not make an AI call.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
- **Screen cache
|
|
15
|
-
- **Element cache
|
|
13
|
+
The cache works at two levels:
|
|
14
|
+
- **Screen cache**: a pixel diff comparison between the present screenshot and the cached screenshot
|
|
15
|
+
- **Element cache**: OpenCV template matching to make sure that the cached element position is still correct
|
|
16
16
|
|
|
17
17
|
## How It Works
|
|
18
18
|
|
|
19
|
-
1. On `find()`, the SDK sends the
|
|
20
|
-
2. The API compares the screenshot against
|
|
21
|
-
3. If the screen pixel diff is
|
|
22
|
-
4.
|
|
19
|
+
1. On `find()`, the SDK sends the present screenshot and the cache metadata to the API.
|
|
20
|
+
2. The API compares the screenshot against the cached results for the same `cacheKey`.
|
|
21
|
+
3. If the screen pixel diff is in the `screen` threshold AND the element template match is more than the `element` threshold, TestDriver returns the cached position.
|
|
22
|
+
4. If not, TestDriver makes a new AI call and caches the result.
|
|
23
23
|
|
|
24
24
|
```mermaid
|
|
25
25
|
flowchart LR
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
3
|
-
sidebarTitle: "
|
|
2
|
+
title: "Self-Learning"
|
|
3
|
+
sidebarTitle: "Self-Learning"
|
|
4
4
|
description: "How TestDriver learns your app and caches what it discovers for instant, deterministic replays"
|
|
5
5
|
icon: "brain"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
After the agent [explored your app](/generating-tests), 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.
|
|
9
|
+
|
|
10
|
+
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.
|
|
9
11
|
|
|
10
|
-
This learning is what makes TestDriver fast. Intelligent caching delivers up to **1.7x faster** test execution by skipping redundant AI vision analysis—the agent only thinks when it sees something new.
|
|
11
12
|
|
|
12
13
|
```javascript
|
|
13
14
|
// First run: builds cache
|
|
@@ -19,14 +20,14 @@ await testdriver.find('submit button');
|
|
|
19
20
|
|
|
20
21
|
## Automatic Caching
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
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:
|
|
23
24
|
|
|
24
|
-
- **File hash**: SHA-256 hash of the test file contents
|
|
25
|
-
- **Selector prompt**: The exact text description
|
|
26
|
-
- **Screenshot context**:
|
|
27
|
-
- **Platform**:
|
|
25
|
+
- **File hash**: The SHA-256 hash of the test file contents
|
|
26
|
+
- **Selector prompt**: The exact text description that you give to `find()`
|
|
27
|
+
- **Screenshot context**: The perceptual hash of the present screen state
|
|
28
|
+
- **Platform**: The operating system and the browser version
|
|
28
29
|
|
|
29
|
-
When you
|
|
30
|
+
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.
|
|
30
31
|
|
|
31
32
|
```javascript
|
|
32
33
|
import { test } from 'vitest';
|
|
@@ -47,7 +48,7 @@ test('auto-cached test', async (context) => {
|
|
|
47
48
|
|
|
48
49
|
## Managing the Cache
|
|
49
50
|
|
|
50
|
-
You can clear the cache
|
|
51
|
+
You can clear the cache in the TestDriver console. There, you also find previews of cached elements, the input prompts, and analytics on the cache hit rates.
|
|
51
52
|
|
|
52
53
|
<Card href="https://console.testdriver.ai/cache" title="TestDriver Cache" icon="database">
|
|
53
54
|
Manage and clear your test cache from the TestDriver console.
|
|
@@ -127,6 +128,6 @@ await testdriver.find(`order ${orderId} status`, {
|
|
|
127
128
|
|
|
128
129
|
## Next
|
|
129
130
|
|
|
130
|
-
<Card href="/
|
|
131
|
+
<Card href="/copilot/running-tests" title="Run" icon="play">
|
|
131
132
|
Now that TestDriver has learned your app, run your tests in CI and locally—replaying the cache for fast, deterministic results.
|
|
132
133
|
</Card>
|
|
@@ -7,7 +7,7 @@ icon: "shield-check"
|
|
|
7
7
|
|
|
8
8
|
# Captcha Solving
|
|
9
9
|
|
|
10
|
-
TestDriver can
|
|
10
|
+
TestDriver can solve captchas automatically during your tests. It uses the 2captcha service. This feature works on **Linux** sandboxes and **Windows** sandboxes.
|
|
11
11
|
|
|
12
12
|
## Quick Start
|
|
13
13
|
|
|
@@ -21,12 +21,12 @@ console.log(result.success); // true
|
|
|
21
21
|
console.log(result.token); // The solved captcha token
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
That
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
24
|
+
That is all. TestDriver does these automatically:
|
|
25
|
+
- Finds the captcha type on the page
|
|
26
|
+
- Gets the sitekey
|
|
27
|
+
- Solves the captcha with 2captcha
|
|
28
|
+
- Puts the token into the page
|
|
29
|
+
- Starts the callbacks
|
|
30
30
|
|
|
31
31
|
## Supported Captcha Types
|
|
32
32
|
|
package/docs/changelog.mdx
CHANGED
|
@@ -65,12 +65,12 @@ Releases test.11 through test.22 include version bumps and internal CI improveme
|
|
|
65
65
|
- **VS Code environment switching** — The TestDriver VS Code extension now includes a status bar indicator and a new **TestDriver: Switch Environment** command. You can switch between stable, canary, and test environments directly from VS Code, and your MCP server configuration updates automatically.
|
|
66
66
|
- **Plan rename: Starter → Pro** — The "Starter" plan has been renamed to **Pro**. No changes to pricing or features — just a clearer name. The "Self-Hosted" tier is now labeled **Enterprise**.
|
|
67
67
|
- **SDK network resilience** — API requests now automatically retry on transient server errors (500, 502, 503, 504) with exponential backoff, reducing flaky test failures caused by brief infrastructure hiccups.
|
|
68
|
-
- **Pricing page refresh** — The [hosted plans page](/
|
|
68
|
+
- **Pricing page refresh** — The [hosted plans page](/hosted) now shows plan cards with included minutes, concurrency limits, and pricing at a glance.
|
|
69
69
|
|
|
70
70
|
📚 Docs updates
|
|
71
71
|
|
|
72
|
-
- **Quickstart redesign** — The [quickstart](/
|
|
73
|
-
- **Deployment section** — "Cloud" is now [Hosted](/
|
|
72
|
+
- **Quickstart redesign** — The [quickstart](/quickstart) now has tabbed setup paths for CLI, GitHub Copilot, and manual installation.
|
|
73
|
+
- **Deployment section** — "Cloud" is now [Hosted](/hosted) and the previous Enterprise page has been consolidated into [Self-Hosted](/self-hosted), which covers both standard and air-gapped deployments.
|
|
74
74
|
|
|
75
75
|
</Update>
|
|
76
76
|
|
|
@@ -93,7 +93,7 @@ This release includes all changes from v7.8.0-test.6 with version bumps across a
|
|
|
93
93
|
|
|
94
94
|
✨ New features
|
|
95
95
|
|
|
96
|
-
- **[GitHub Copilot integration](/
|
|
96
|
+
- **[GitHub Copilot integration](/copilot/running-tests)** — Use TestDriver directly from GitHub Copilot in VS Code. The new MCP server lets Copilot launch sandboxes, interact with elements, and run assertions through natural language. Includes guides for [creating tests](/generating-tests), [running tests](/copilot/running-tests), [GitHub Actions integration](/copilot/auto-healing#use-testdriver-in-github), and [auto-healing](/copilot/auto-healing).
|
|
97
97
|
|
|
98
98
|
🔧 Improvements
|
|
99
99
|
|
|
@@ -109,18 +109,18 @@ This release includes all changes from v7.8.0-canary.4 with version bumps.
|
|
|
109
109
|
|
|
110
110
|
✨ New features
|
|
111
111
|
|
|
112
|
-
- **[Cache API](/
|
|
113
|
-
- **[Custom error classes](/
|
|
114
|
-
- **[Events system](/
|
|
115
|
-
- **[Provision API](/
|
|
116
|
-
- **[Redraw detection](/
|
|
117
|
-
- **[Screenshots API](/
|
|
112
|
+
- **[Cache API](/cache)** — Speed up repeated test runs with screenshot-based caching. The system compares screenshots to cached results and reuses element positions when the screen hasn't changed, reducing AI calls.
|
|
113
|
+
- **[Custom error classes](/errors)** — New `ElementNotFoundError` class with rich debugging info including screenshot paths, pixel diffs, and detailed messages.
|
|
114
|
+
- **[Events system](/events)** — Listen to SDK lifecycle events with wildcard support via `testdriver.emitter`. Uses colon-delimited namespaces (e.g., `command:start`, `log:*`).
|
|
115
|
+
- **[Provision API](/provision)** — Launch browsers, desktop apps, VS Code, and Chrome extensions in your sandbox before tests run. Access via `testdriver.provision.*`.
|
|
116
|
+
- **[Redraw detection](/redraw)** — Wait for screens to stabilize after interactions using two-phase detection with pixel comparison and z-score analysis.
|
|
117
|
+
- **[Screenshots API](/screenshots)** — Capture screenshots manually with `testdriver.screenshot()` or automatically before/after every command.
|
|
118
118
|
|
|
119
119
|
📚 New examples
|
|
120
120
|
|
|
121
|
-
- [Exec output](/
|
|
122
|
-
- [Exec PowerShell](/
|
|
123
|
-
- [Focus window](/
|
|
121
|
+
- [Exec output](/examples/exec-output) — Capture and use output from PowerShell commands
|
|
122
|
+
- [Exec PowerShell](/examples/exec-pwsh) — Generate dynamic data with PowerShell
|
|
123
|
+
- [Focus window](/examples/focus-window) — Switch focus between application windows
|
|
124
124
|
|
|
125
125
|
🔧 Improvements
|
|
126
126
|
|
|
@@ -5,21 +5,21 @@ description: "Run TestDriver tests in CI/CD with parallel execution and cross-pl
|
|
|
5
5
|
icon: "code-branch"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
TestDriver integrates
|
|
8
|
+
TestDriver integrates with the common CI providers. It lets you do automated end-to-end tests on each push and pull request.
|
|
9
9
|
|
|
10
10
|
## Authentication
|
|
11
11
|
|
|
12
|
-
On **GitHub Actions,
|
|
13
|
-
there
|
|
14
|
-
workflow
|
|
12
|
+
On **GitHub Actions, use OIDC** through the published `testdriverai/action`. Then
|
|
13
|
+
there is no `TD_API_KEY` secret to store, copy, or change. The action shows that the
|
|
14
|
+
workflow runs in your org. TestDriver changes that proof for your
|
|
15
15
|
team's key at run time. See the GitHub Actions tab below.
|
|
16
16
|
|
|
17
|
-
For other CI providers (or self-hosted runners without OIDC),
|
|
18
|
-
stored API key from [console.testdriver.ai/settings](https://console.testdriver.ai/settings)
|
|
19
|
-
|
|
17
|
+
For other CI providers (or self-hosted runners without OIDC), use a
|
|
18
|
+
stored API key from [console.testdriver.ai/settings](https://console.testdriver.ai/settings).
|
|
19
|
+
Add it as a `TD_API_KEY` secret in the settings of your CI provider.
|
|
20
20
|
|
|
21
21
|
<Note>
|
|
22
|
-
Never commit your API key
|
|
22
|
+
Never commit your API key in the code. Always use OIDC or the secrets management of your CI provider.
|
|
23
23
|
</Note>
|
|
24
24
|
|
|
25
25
|
## CI Provider Examples
|
|
@@ -28,10 +28,10 @@ added as a `TD_API_KEY` secret in your CI provider's settings.
|
|
|
28
28
|
<Tab title="GitHub Actions">
|
|
29
29
|
### Authenticate with OIDC via `testdriverai/action` (recommended)
|
|
30
30
|
|
|
31
|
-
Use the published [`testdriverai/action`](https://github.com/testdriverai/action)
|
|
31
|
+
Use the published [`testdriverai/action`](https://github.com/testdriverai/action). It makes the OIDC token, changes it for your team's API key, and exports `TD_API_KEY` for the steps that come after. **There is no `TD_API_KEY` secret to store or change.**
|
|
32
32
|
|
|
33
33
|
<Note>
|
|
34
|
-
|
|
34
|
+
Do this one time: authorize the [TestDriver GitHub App](https://console.testdriver.ai) for your org. Then the org → team binding exists. If your org authorized the App before OIDC support was available, authorize it again one time. If the App is not authorized, the action fails with a console link. (Or it uses the `api-key` secret if you give one.)
|
|
35
35
|
</Note>
|
|
36
36
|
|
|
37
37
|
```yaml .github/workflows/testdriver.yml
|
|
@@ -7,7 +7,7 @@ icon: "mouse-pointer"
|
|
|
7
7
|
|
|
8
8
|
## Element Click
|
|
9
9
|
|
|
10
|
-
When
|
|
10
|
+
When you call this on an Element object, it clicks on the found element.
|
|
11
11
|
|
|
12
12
|
### Syntax
|
|
13
13
|
|
|
@@ -90,7 +90,7 @@ await testdriver.click(500, 300, 'right-click');
|
|
|
90
90
|
|
|
91
91
|
### Regular Click
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
One left-click action.
|
|
94
94
|
|
|
95
95
|
```javascript
|
|
96
96
|
const button = await testdriver.find('Login button');
|
|
@@ -99,7 +99,7 @@ await button.click();
|
|
|
99
99
|
|
|
100
100
|
### Double Click
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
A double-click action. It usually opens files or selects text.
|
|
103
103
|
|
|
104
104
|
```javascript
|
|
105
105
|
const file = await testdriver.find('document.pdf');
|
|
@@ -123,7 +123,7 @@ await folder.rightClick();
|
|
|
123
123
|
|
|
124
124
|
### Mouse Down / Mouse Up
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
Use these for drag operations or custom click behavior.
|
|
127
127
|
|
|
128
128
|
```javascript
|
|
129
129
|
const draggable = await testdriver.find('draggable item');
|
|
@@ -142,9 +142,9 @@ await dropZone.mouseUp();
|
|
|
142
142
|
## Best Practices
|
|
143
143
|
|
|
144
144
|
<Check>
|
|
145
|
-
**Prefer element clicks
|
|
145
|
+
**Prefer element clicks to coordinate clicks**
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
A click on an element is more reliable. It does not depend on the resolution:
|
|
148
148
|
|
|
149
149
|
```javascript
|
|
150
150
|
// ✅ Preferred
|
|
@@ -157,7 +157,7 @@ await dropZone.mouseUp();
|
|
|
157
157
|
</Check>
|
|
158
158
|
|
|
159
159
|
<Check>
|
|
160
|
-
**
|
|
160
|
+
**Make sure that TestDriver found the element**
|
|
161
161
|
|
|
162
162
|
```javascript
|
|
163
163
|
const element = await testdriver.find('button');
|
|
@@ -169,9 +169,9 @@ await dropZone.mouseUp();
|
|
|
169
169
|
</Check>
|
|
170
170
|
|
|
171
171
|
<Warning>
|
|
172
|
-
**
|
|
172
|
+
**TestDriver must find the element before you click it**
|
|
173
173
|
|
|
174
|
-
The `find()` method automatically
|
|
174
|
+
The `find()` method finds elements automatically. But a click on an element that TestDriver did not find throws an error:
|
|
175
175
|
|
|
176
176
|
```javascript
|
|
177
177
|
const element = await testdriver.find('button');
|
|
@@ -281,7 +281,7 @@ describe('Click Interactions', () => {
|
|
|
281
281
|
|
|
282
282
|
## Related Methods
|
|
283
283
|
|
|
284
|
-
- [`find()`](/
|
|
285
|
-
- [`hover()`](/
|
|
286
|
-
- [`doubleClick()`](/
|
|
287
|
-
- [`rightClick()`](/
|
|
284
|
+
- [`find()`](/find) - Find elements to click
|
|
285
|
+
- [`hover()`](/hover) - Put the cursor on the element without a click
|
|
286
|
+
- [`doubleClick()`](/double-click) - The double-click method
|
|
287
|
+
- [`rightClick()`](/right-click) - The right-click method
|