@testdriverai/agent 7.11.239-test → 7.11.241-canary
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-agent/SKILL.md +174 -91
- package/ai/skills/testdriver-assert/SKILL.md +73 -269
- package/ai/skills/testdriver-aws-setup/SKILL.md +194 -312
- package/ai/skills/testdriver-bring-your-own-machine/SKILL.md +137 -204
- package/ai/skills/testdriver-cache/SKILL.md +142 -149
- package/ai/skills/testdriver-caching/SKILL.md +97 -87
- package/ai/skills/testdriver-captcha/SKILL.md +126 -111
- package/ai/skills/testdriver-ci-cd/SKILL.md +153 -542
- package/ai/skills/testdriver-click/SKILL.md +74 -229
- package/ai/skills/testdriver-client/SKILL.md +175 -229
- package/ai/skills/testdriver-customizing-devices/SKILL.md +72 -250
- package/ai/skills/testdriver-dashcam/SKILL.md +71 -404
- package/ai/skills/testdriver-debugging-with-screenshots/SKILL.md +103 -369
- package/ai/skills/testdriver-double-click/SKILL.md +46 -67
- package/ai/skills/testdriver-errors/SKILL.md +102 -176
- package/ai/skills/testdriver-events/SKILL.md +170 -327
- package/ai/skills/testdriver-exec/SKILL.md +92 -256
- package/ai/skills/testdriver-extract/SKILL.md +69 -170
- package/ai/skills/testdriver-find/SKILL.md +140 -736
- package/ai/skills/testdriver-focus-application/SKILL.md +69 -246
- package/ai/skills/testdriver-generating-tests/SKILL.md +102 -136
- package/ai/skills/testdriver-hosted/SKILL.md +79 -143
- package/ai/skills/testdriver-hover/SKILL.md +62 -235
- package/ai/skills/testdriver-locating-elements/SKILL.md +71 -366
- package/ai/skills/testdriver-making-assertions/SKILL.md +114 -72
- package/ai/skills/testdriver-mcp-setup/SKILL.md +79 -62
- package/ai/skills/testdriver-mouse-down/SKILL.md +46 -124
- package/ai/skills/testdriver-mouse-up/SKILL.md +45 -128
- package/ai/skills/testdriver-options/SKILL.md +73 -46
- package/ai/skills/testdriver-parse/SKILL.md +95 -184
- package/ai/skills/testdriver-performing-actions/SKILL.md +101 -91
- package/ai/skills/testdriver-press-keys/SKILL.md +59 -299
- package/ai/skills/testdriver-provision/SKILL.md +135 -179
- package/ai/skills/testdriver-quickstart/SKILL.md +24 -8
- package/ai/skills/testdriver-quickstart-claude/SKILL.md +84 -0
- package/ai/skills/testdriver-quickstart-github/SKILL.md +62 -32
- package/ai/skills/testdriver-quickstart-manual/SKILL.md +59 -32
- package/ai/skills/testdriver-quickstart-vscode/SKILL.md +96 -0
- package/ai/skills/testdriver-redraw/SKILL.md +100 -164
- package/ai/skills/testdriver-reusable-code/SKILL.md +95 -199
- package/ai/skills/testdriver-right-click/SKILL.md +45 -88
- package/ai/skills/testdriver-screenshot/SKILL.md +47 -201
- package/ai/skills/testdriver-screenshots/SKILL.md +86 -136
- package/ai/skills/testdriver-scroll/SKILL.md +71 -154
- package/ai/skills/testdriver-secrets/SKILL.md +94 -90
- package/ai/skills/testdriver-self-hosted/SKILL.md +82 -140
- package/ai/skills/testdriver-test-results-json/SKILL.md +165 -202
- package/ai/skills/testdriver-type/SKILL.md +56 -304
- package/ai/skills/testdriver-variables/SKILL.md +119 -80
- package/ai/skills/testdriver-wait/SKILL.md +31 -29
- package/ai/skills/testdriver-what-is-testdriver/SKILL.md +80 -32
- package/package.json +1 -1
|
@@ -1,311 +1,267 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: testdriver:provision
|
|
3
|
-
description:
|
|
3
|
+
description: Start Chrome, a Chrome extension, VS Code, an Electron app, or an installer in the sandbox.
|
|
4
4
|
---
|
|
5
5
|
<!-- Generated from provision.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
The Provision API sets up applications in your sandbox before the tests run. It downloads, installs, and starts browsers, desktop apps, VS Code, Chrome extensions, and more.
|
|
10
|
-
|
|
11
|
-
Use the provision methods through `testdriver.provision.*`:
|
|
7
|
+
Start the app you want to test with a `provision` method. Call one at the beginning of each test.
|
|
12
8
|
|
|
13
9
|
```javascript
|
|
14
|
-
await testdriver.provision.chrome({ url: 'https://
|
|
10
|
+
await testdriver.provision.chrome({ url: 'https://testdriver-sandbox.vercel.app/login' });
|
|
15
11
|
```
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
Every provision method:
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
- Launches or installs the app in the sandbox. The Chrome methods also wait until Chrome is ready.
|
|
16
|
+
- Starts the [Dashcam](/dashcam) recording, unless you turned it off with `dashcam: false`.
|
|
17
|
+
- Does nothing when the client was created with `reconnect: true`, because the app is already running.
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
| Method | Use it to test |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| [`chrome()`](#chrome-options) | A website |
|
|
22
|
+
| [`chromeExtension()`](#chromeextension-options) | A Chrome extension |
|
|
23
|
+
| [`vscode()`](#vscode-options) | VS Code or a VS Code extension |
|
|
24
|
+
| [`installer()`](#installer-options) | A desktop app you download and install |
|
|
25
|
+
| [`electron()`](#electron-options) | An Electron app |
|
|
26
|
+
| [`dashcam()`](#dashcam-options) | Custom recording settings |
|
|
22
27
|
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
## chrome(options)
|
|
29
|
+
|
|
30
|
+
Opens Chrome at a URL.
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
testdriver.provision.chrome(options?: ProvisionChromeOptions): Promise<void>
|
|
25
34
|
```
|
|
26
35
|
|
|
27
36
|
<ParamField path="options" type="ProvisionChromeOptions">
|
|
28
37
|
<Expandable title="properties">
|
|
29
38
|
<ParamField path="url" type="string" default="http://testdriver-sandbox.vercel.app/">
|
|
30
|
-
The
|
|
39
|
+
The page to open.
|
|
31
40
|
</ParamField>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Start Chrome with the window at the maximum size.
|
|
41
|
+
<ParamField path="maximized" type="boolean" default="true">
|
|
42
|
+
Start with the window maximized.
|
|
35
43
|
</ParamField>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Start Chrome in the guest profile mode.
|
|
44
|
+
<ParamField path="guest" type="boolean" default="false">
|
|
45
|
+
Use Chrome's guest profile, with no saved data.
|
|
39
46
|
</ParamField>
|
|
40
47
|
</Expandable>
|
|
41
48
|
</ParamField>
|
|
42
49
|
|
|
50
|
+
Chrome also records the site's network traffic in the Dashcam replay.
|
|
51
|
+
|
|
43
52
|
```javascript
|
|
44
|
-
|
|
45
|
-
await testdriver.provision.chrome({ url: 'https://example.com' });
|
|
46
|
-
|
|
47
|
-
// With guest mode
|
|
48
|
-
await testdriver.provision.chrome({
|
|
49
|
-
url: 'https://example.com',
|
|
50
|
-
guest: true,
|
|
51
|
-
maximized: true,
|
|
52
|
-
});
|
|
53
|
+
await testdriver.provision.chrome({ url: 'https://example.com', guest: true });
|
|
53
54
|
```
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
## chromeExtension(options)
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
Opens Chrome with an extension loaded.
|
|
58
59
|
|
|
59
|
-
```
|
|
60
|
-
|
|
60
|
+
```typescript
|
|
61
|
+
testdriver.provision.chromeExtension(options: ProvisionChromeExtensionOptions): Promise<void>
|
|
61
62
|
```
|
|
62
63
|
|
|
63
64
|
<ParamField path="options" type="ProvisionChromeExtensionOptions" required>
|
|
64
|
-
|
|
65
|
+
Pass either `extensionId` or `extensionPath`. It throws if you pass neither.
|
|
65
66
|
|
|
66
67
|
<Expandable title="properties">
|
|
67
|
-
<ParamField path="extensionPath" type="string">
|
|
68
|
-
Local path to an unpacked extension directory. The extension files are uploaded to the sandbox.
|
|
69
|
-
</ParamField>
|
|
70
|
-
|
|
71
68
|
<ParamField path="extensionId" type="string">
|
|
72
|
-
Chrome Web Store extension ID
|
|
69
|
+
A Chrome Web Store extension ID. TestDriver downloads the extension into the sandbox.
|
|
73
70
|
</ParamField>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
<ParamField path="extensionPath" type="string">
|
|
72
|
+
The path to an unpacked extension **inside the sandbox**. Nothing is copied from your machine, so get the files there first, for example with [`exec()`](/exec).
|
|
73
|
+
</ParamField>
|
|
74
|
+
<ParamField path="maximized" type="boolean" default="true">
|
|
75
|
+
Start with the window maximized.
|
|
77
76
|
</ParamField>
|
|
78
77
|
</Expandable>
|
|
79
78
|
</ParamField>
|
|
80
79
|
|
|
80
|
+
From the Chrome Web Store:
|
|
81
|
+
|
|
81
82
|
```javascript
|
|
82
|
-
// From local directory
|
|
83
83
|
await testdriver.provision.chromeExtension({
|
|
84
|
-
|
|
84
|
+
extensionId: 'cjpalhdlnbpafiamejdnhcphjbkeiagm', // uBlock Origin
|
|
85
85
|
});
|
|
86
|
+
```
|
|
86
87
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
From source:
|
|
89
|
+
|
|
90
|
+
```javascript
|
|
91
|
+
await testdriver.exec({
|
|
92
|
+
language: 'sh',
|
|
93
|
+
code: 'git clone https://github.com/your-org/your-extension.git /tmp/your-extension',
|
|
90
94
|
});
|
|
95
|
+
await testdriver.provision.chromeExtension({ extensionPath: '/tmp/your-extension' });
|
|
91
96
|
```
|
|
92
97
|
|
|
93
|
-
|
|
98
|
+
## vscode(options)
|
|
94
99
|
|
|
95
|
-
|
|
100
|
+
Opens VS Code, optionally with a folder and extensions.
|
|
96
101
|
|
|
97
|
-
```
|
|
98
|
-
|
|
102
|
+
```typescript
|
|
103
|
+
testdriver.provision.vscode(options?: ProvisionVSCodeOptions): Promise<void>
|
|
99
104
|
```
|
|
100
105
|
|
|
101
106
|
<ParamField path="options" type="ProvisionVSCodeOptions">
|
|
102
107
|
<Expandable title="properties">
|
|
103
108
|
<ParamField path="workspace" type="string">
|
|
104
|
-
|
|
109
|
+
A folder or `.code-workspace` file in the sandbox to open.
|
|
105
110
|
</ParamField>
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
Array of VS Code extension IDs to install before launching.
|
|
111
|
+
<ParamField path="extensions" type="string[]" default="[]">
|
|
112
|
+
Marketplace extension IDs to install before VS Code opens.
|
|
109
113
|
</ParamField>
|
|
110
114
|
</Expandable>
|
|
111
115
|
</ParamField>
|
|
112
116
|
|
|
113
117
|
```javascript
|
|
114
118
|
await testdriver.provision.vscode({
|
|
115
|
-
workspace: '/
|
|
116
|
-
extensions: ['
|
|
119
|
+
workspace: '/tmp/my-project',
|
|
120
|
+
extensions: ['esbenp.prettier-vscode'],
|
|
117
121
|
});
|
|
118
122
|
```
|
|
119
123
|
|
|
120
|
-
|
|
124
|
+
## installer(options)
|
|
121
125
|
|
|
122
|
-
|
|
126
|
+
Downloads a file into the sandbox, installs it, and returns the downloaded file's path.
|
|
123
127
|
|
|
124
|
-
```
|
|
125
|
-
|
|
128
|
+
```typescript
|
|
129
|
+
testdriver.provision.installer(options: ProvisionInstallerOptions): Promise<string>
|
|
126
130
|
```
|
|
127
131
|
|
|
128
132
|
<ParamField path="options" type="ProvisionInstallerOptions" required>
|
|
129
133
|
<Expandable title="properties">
|
|
130
134
|
<ParamField path="url" type="string" required>
|
|
131
|
-
|
|
135
|
+
Where to download the file from.
|
|
132
136
|
</ParamField>
|
|
133
|
-
|
|
134
137
|
<ParamField path="filename" type="string">
|
|
135
|
-
|
|
138
|
+
The name to save the file as. By default, it comes from the download.
|
|
136
139
|
</ParamField>
|
|
137
|
-
|
|
138
140
|
<ParamField path="appName" type="string">
|
|
139
|
-
|
|
141
|
+
The app to bring to the front after installing.
|
|
140
142
|
</ParamField>
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
<ParamField path="launch" type="boolean" default="true">
|
|
144
|
+
Start the app after installing it.
|
|
145
|
+
|
|
146
|
+
- **`.deb` on Linux:** starts the app from its `.desktop` entry. If there isn't one and you set `appName`, it starts the package's first `/usr/bin` program.
|
|
147
|
+
- **`.sh` scripts:** runs the script.
|
|
148
|
+
- **Everywhere:** focuses `appName`, if you set it.
|
|
149
|
+
|
|
150
|
+
With `false`, packages are still installed, and a script is only made executable.
|
|
144
151
|
</ParamField>
|
|
145
152
|
</Expandable>
|
|
146
153
|
</ParamField>
|
|
147
154
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
155
|
+
TestDriver picks the install method from the file extension:
|
|
156
|
+
|
|
157
|
+
| OS | Extension | What happens |
|
|
158
|
+
| --- | --- | --- |
|
|
159
|
+
| Windows | `.msi` | Installed quietly with `msiexec` |
|
|
160
|
+
| Windows | `.exe` | Run with `/S` for a silent install |
|
|
161
|
+
| Linux | `.deb` | Installed with `dpkg`. Missing dependencies are installed with `apt-get`, and the step fails if the package still isn't fully installed |
|
|
162
|
+
| Linux | `.rpm` | Installed with `rpm` |
|
|
163
|
+
| Linux | `.AppImage` | Made executable |
|
|
164
|
+
| Linux | `.sh` | Made executable and run (only made executable with `launch: false`) |
|
|
165
|
+
| macOS | `.dmg`, `.pkg` | Copied to Applications, or installed with `installer` |
|
|
166
|
+
|
|
167
|
+
Other file types are downloaded but not installed.
|
|
153
168
|
|
|
154
169
|
```javascript
|
|
155
|
-
//
|
|
170
|
+
// Install bat, then check that it runs (bat has no window, so nothing is launched)
|
|
156
171
|
await testdriver.provision.installer({
|
|
157
|
-
url: 'https://
|
|
158
|
-
appName: 'MyApp',
|
|
172
|
+
url: 'https://github.com/sharkdp/bat/releases/download/v0.24.0/bat_0.24.0_amd64.deb',
|
|
159
173
|
});
|
|
174
|
+
const output = await testdriver.exec({ language: 'sh', code: 'bat --version' });
|
|
175
|
+
console.log(output); // for example "bat 0.24.0"
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Install a desktop app and start it:
|
|
160
179
|
|
|
161
|
-
|
|
180
|
+
```javascript
|
|
181
|
+
// Installs Yaak and its dependencies, starts it, and brings its window to the front
|
|
162
182
|
await testdriver.provision.installer({
|
|
163
|
-
url: 'https://
|
|
164
|
-
appName: '
|
|
165
|
-
launch: true,
|
|
183
|
+
url: 'https://github.com/mountain-loop/yaak/releases/download/v2026.9.0/yaak_2026.9.0_amd64.deb',
|
|
184
|
+
appName: 'Yaak',
|
|
166
185
|
});
|
|
167
186
|
```
|
|
168
187
|
|
|
169
|
-
|
|
188
|
+
## electron(options)
|
|
170
189
|
|
|
171
|
-
|
|
190
|
+
Opens an Electron app that's already in the sandbox.
|
|
172
191
|
|
|
173
|
-
```
|
|
174
|
-
|
|
192
|
+
```typescript
|
|
193
|
+
testdriver.provision.electron(options: ProvisionElectronOptions): Promise<void>
|
|
175
194
|
```
|
|
176
195
|
|
|
177
196
|
<ParamField path="options" type="ProvisionElectronOptions" required>
|
|
178
197
|
<Expandable title="properties">
|
|
179
198
|
<ParamField path="appPath" type="string" required>
|
|
180
|
-
|
|
199
|
+
The path to the app in the sandbox. It throws if this is missing.
|
|
181
200
|
</ParamField>
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
Additional command-line arguments to pass to the Electron app.
|
|
201
|
+
<ParamField path="args" type="string[]" default="[]">
|
|
202
|
+
Extra command-line arguments for the app.
|
|
185
203
|
</ParamField>
|
|
186
204
|
</Expandable>
|
|
187
205
|
</ParamField>
|
|
188
206
|
|
|
189
207
|
```javascript
|
|
190
|
-
await testdriver.provision.electron({
|
|
191
|
-
appPath: '/home/testdriver/my-electron-app',
|
|
192
|
-
args: ['--no-sandbox'],
|
|
193
|
-
});
|
|
208
|
+
await testdriver.provision.electron({ appPath: '/tmp/my-electron-app', args: ['--no-sandbox'] });
|
|
194
209
|
```
|
|
195
210
|
|
|
196
|
-
|
|
211
|
+
## dashcam(options)
|
|
197
212
|
|
|
198
|
-
|
|
213
|
+
Starts the Dashcam recording with your own settings. The other provision methods start it for you, so call this only to change the log file, the log name, or the recording's title.
|
|
199
214
|
|
|
200
|
-
```
|
|
201
|
-
|
|
215
|
+
```typescript
|
|
216
|
+
testdriver.provision.dashcam(options?: ProvisionDashcamOptions): Promise<void>
|
|
202
217
|
```
|
|
203
218
|
|
|
204
219
|
<ParamField path="options" type="ProvisionDashcamOptions">
|
|
205
220
|
<Expandable title="properties">
|
|
206
221
|
<ParamField path="logPath" type="string">
|
|
207
|
-
|
|
222
|
+
A log file in the sandbox to include in the replay. Defaults to `/tmp/testdriver.log` on Linux, or `C:\Users\testdriver\testdriver.log` on Windows.
|
|
208
223
|
</ParamField>
|
|
209
|
-
|
|
210
224
|
<ParamField path="logName" type="string" default="TestDriver Log">
|
|
211
|
-
|
|
225
|
+
The log's name in the replay.
|
|
212
226
|
</ParamField>
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
Enable web traffic log capture.
|
|
227
|
+
<ParamField path="webLogs" type="boolean" default="true">
|
|
228
|
+
Record network traffic. It covers the site opened with `chrome()`, or all traffic otherwise.
|
|
216
229
|
</ParamField>
|
|
217
|
-
|
|
218
230
|
<ParamField path="title" type="string">
|
|
219
|
-
|
|
231
|
+
A title for the recording.
|
|
220
232
|
</ParamField>
|
|
221
233
|
</Expandable>
|
|
222
234
|
</ParamField>
|
|
223
235
|
|
|
224
236
|
```javascript
|
|
225
|
-
await testdriver.provision.dashcam({
|
|
226
|
-
title: 'Login Flow Test',
|
|
227
|
-
logPath: '/tmp/my-app.log',
|
|
228
|
-
logName: 'Application Log',
|
|
229
|
-
webLogs: true,
|
|
230
|
-
});
|
|
237
|
+
await testdriver.provision.dashcam({ title: 'Checkout flow', logPath: '/tmp/my-app.log', logName: 'App log' });
|
|
231
238
|
```
|
|
232
239
|
|
|
233
|
-
##
|
|
240
|
+
## Complete example
|
|
234
241
|
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
maximized?: boolean; // Default: true
|
|
239
|
-
guest?: boolean; // Default: false
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
interface ProvisionChromeExtensionOptions {
|
|
243
|
-
extensionPath?: string; // Local unpacked extension path
|
|
244
|
-
extensionId?: string; // Chrome Web Store ID
|
|
245
|
-
maximized?: boolean; // Default: true
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
interface ProvisionVSCodeOptions {
|
|
249
|
-
workspace?: string; // Workspace path
|
|
250
|
-
extensions?: string[]; // Extension IDs to install
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
interface ProvisionInstallerOptions {
|
|
254
|
-
url: string; // Download URL (required)
|
|
255
|
-
filename?: string; // Override filename
|
|
256
|
-
appName?: string; // App name to focus
|
|
257
|
-
launch?: boolean; // Default: true
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
interface ProvisionElectronOptions {
|
|
261
|
-
appPath: string; // Path to Electron app (required)
|
|
262
|
-
args?: string[]; // Additional args
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
interface ProvisionDashcamOptions {
|
|
266
|
-
logPath?: string; // Log file path
|
|
267
|
-
logName?: string; // Default: "TestDriver Log"
|
|
268
|
-
webLogs?: boolean; // Default: true
|
|
269
|
-
title?: string; // Recording title
|
|
270
|
-
}
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
## Complete Example
|
|
242
|
+
```javascript tests/extension.test.mjs
|
|
243
|
+
import { describe, expect, it } from 'vitest';
|
|
244
|
+
import { TestDriver } from 'testdriverai/vitest/hooks';
|
|
274
245
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
describe('Chrome Extension Test', () => {
|
|
280
|
-
let testdriver;
|
|
246
|
+
describe('Loom extension', () => {
|
|
247
|
+
it('appears in the extensions menu', async (context) => {
|
|
248
|
+
const testdriver = TestDriver(context);
|
|
281
249
|
|
|
282
|
-
beforeAll(async () => {
|
|
283
|
-
testdriver = new TestDriver({
|
|
284
|
-
os: 'linux',
|
|
285
|
-
resolution: '1920x1080',
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
await testdriver.ready();
|
|
289
|
-
|
|
290
|
-
// Install extension and open Chrome
|
|
291
250
|
await testdriver.provision.chromeExtension({
|
|
292
|
-
|
|
251
|
+
extensionId: 'liecbddmkiiihnedobmlmillhodjkdmb',
|
|
293
252
|
});
|
|
294
|
-
|
|
295
|
-
// Start Dashcam with custom logs
|
|
296
|
-
await testdriver.provision.dashcam({
|
|
297
|
-
title: 'Extension Test',
|
|
298
|
-
webLogs: true,
|
|
299
|
-
});
|
|
300
|
-
});
|
|
301
253
|
|
|
302
|
-
|
|
303
|
-
await testdriver.disconnect();
|
|
304
|
-
});
|
|
254
|
+
await testdriver.find('puzzle-piece extensions icon in the Chrome toolbar').click();
|
|
305
255
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
await testdriver.find('popup content').click();
|
|
256
|
+
const loom = await testdriver.find('Loom in the extensions dropdown');
|
|
257
|
+
expect(loom.found()).toBe(true);
|
|
309
258
|
});
|
|
310
259
|
});
|
|
311
260
|
```
|
|
261
|
+
|
|
262
|
+
## Related
|
|
263
|
+
|
|
264
|
+
- [Client & connection](/client): create and connect the client
|
|
265
|
+
- [exec()](/exec): run commands in the sandbox, for example to fetch files before provisioning
|
|
266
|
+
- [Dashcam](/dashcam): how runs are recorded
|
|
267
|
+
- [Examples](/examples/installer): complete tests that install and launch apps
|
|
@@ -1,21 +1,37 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: testdriver:quickstart
|
|
3
|
-
description:
|
|
3
|
+
description: Start with TestDriver from GitHub, Claude Code, VS Code, Cursor, any MCP client, or your own project.
|
|
4
4
|
---
|
|
5
5
|
<!-- Generated from quickstart.mdx. DO NOT EDIT. -->
|
|
6
6
|
|
|
7
|
-
TestDriver writes and runs
|
|
7
|
+
TestDriver writes and runs end-to-end tests for web apps, desktop apps, and browser extensions.
|
|
8
|
+
|
|
9
|
+
Each test describes what a user sees and does in plain language. It runs on a real machine in the cloud.
|
|
10
|
+
|
|
11
|
+
Choose where you want to start:
|
|
8
12
|
|
|
9
13
|
<CardGroup cols={1}>
|
|
10
14
|
<Card title="Add to GitHub" icon="github" href="/quickstart-github" arrow horizontal>
|
|
11
|
-
|
|
15
|
+
An AI code reviewer that tests every pull request in a real sandbox.
|
|
16
|
+
</Card>
|
|
17
|
+
<Card title="Claude Code" icon="terminal" href="/quickstart-claude" arrow horizontal>
|
|
18
|
+
Install the plugin to write and run tests from Claude Code.
|
|
12
19
|
</Card>
|
|
13
|
-
<Card title="
|
|
14
|
-
|
|
20
|
+
<Card title="VS Code & Cursor" icon="code" href="/quickstart-vscode" arrow horizontal>
|
|
21
|
+
Install the extension to write tests and watch them run live.
|
|
15
22
|
</Card>
|
|
16
|
-
<Card title="
|
|
17
|
-
Add
|
|
23
|
+
<Card title="Connect your AI client" icon="plug" href="/mcp-setup" arrow horizontal>
|
|
24
|
+
Add one URL to any MCP client, such as Claude or ChatGPT.
|
|
25
|
+
</Card>
|
|
26
|
+
<Card title="Set up a project" icon="wrench" href="/quickstart-manual" arrow horizontal>
|
|
27
|
+
Write and run Vitest tests in your own repository.
|
|
18
28
|
</Card>
|
|
19
29
|
</CardGroup>
|
|
20
30
|
|
|
21
|
-
|
|
31
|
+
Not sure? Start with GitHub. Your next pull request gets a review without any setup.
|
|
32
|
+
|
|
33
|
+
Set up a project when you want to write and run tests yourself.
|
|
34
|
+
|
|
35
|
+
<Tip>
|
|
36
|
+
Questions along the way? Ask in the [TestDriver Discord](https://discord.com/invite/cWDFW8DzPm).
|
|
37
|
+
</Tip>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: testdriver:quickstart-claude
|
|
3
|
+
description: Install one plugin to get the TestDriver MCP server, agent, and skills in Claude Code.
|
|
4
|
+
---
|
|
5
|
+
<!-- Generated from quickstart-claude.mdx. DO NOT EDIT. -->
|
|
6
|
+
|
|
7
|
+
Install the TestDriver plugin, and Claude Code can write, run, and debug end-to-end tests in a live sandbox.
|
|
8
|
+
|
|
9
|
+
The plugin bundles three things:
|
|
10
|
+
|
|
11
|
+
- The TestDriver MCP server
|
|
12
|
+
- The `testdriver` agent, which builds tests step by step
|
|
13
|
+
- Skills that teach Claude the TestDriver SDK
|
|
14
|
+
|
|
15
|
+
## Before you begin
|
|
16
|
+
|
|
17
|
+
- **[Claude Code](https://code.claude.com)** and **Node.js 20.19 or later**, which runs the MCP server.
|
|
18
|
+
- **A TestDriver API key.** Create one at [console.testdriver.ai/team/api-keys](https://console.testdriver.ai/team/api-keys).
|
|
19
|
+
- **A project with the TestDriver SDK installed**, so the agent can run the tests it writes. If you don't have one yet, see [Set up a project](/quickstart-manual).
|
|
20
|
+
|
|
21
|
+
<Steps>
|
|
22
|
+
<Step title="Set your API key">
|
|
23
|
+
|
|
24
|
+
The plugin's MCP server reads your key from the `TD_API_KEY` environment variable. Add it to your shell profile (such as `~/.zshrc`) so every Claude Code session can use it:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
export TD_API_KEY="your_api_key"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Open a new terminal, or run `source ~/.zshrc`, before you start Claude Code.
|
|
31
|
+
|
|
32
|
+
</Step>
|
|
33
|
+
<Step title="Install the plugin">
|
|
34
|
+
|
|
35
|
+
TestDriver is a community plugin. In Claude Code, run `/plugin`, open the **Discover** tab, search for **TestDriver**, and install it.
|
|
36
|
+
|
|
37
|
+
You can also install it from TestDriver's own marketplace:
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
/plugin marketplace add testdriverai/testdriverai
|
|
41
|
+
/plugin install testdriver@testdriver
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
</Step>
|
|
45
|
+
<Step title="Check the connection">
|
|
46
|
+
|
|
47
|
+
Run `/mcp` in Claude Code. The `testdriver` server should be listed as connected.
|
|
48
|
+
|
|
49
|
+
If it isn't, check that `TD_API_KEY` is set in the terminal you started Claude Code from.
|
|
50
|
+
|
|
51
|
+
</Step>
|
|
52
|
+
<Step title="Write your first test">
|
|
53
|
+
|
|
54
|
+
Ask for the TestDriver agent by name:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
Use the testdriver agent to write a test that logs in to https://testdriver-sandbox.vercel.app/login and adds an item to the cart.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The agent starts a sandbox and performs each step. It writes the code into a test file under `tests/`, then runs it with Vitest until it passes.
|
|
61
|
+
|
|
62
|
+
</Step>
|
|
63
|
+
</Steps>
|
|
64
|
+
|
|
65
|
+
<Tip>
|
|
66
|
+
Only need TestDriver's tools in chat, without the agent or skills? Add the hosted server instead. It signs in through your browser and needs no API key. See [MCP Setup](/mcp-setup).
|
|
67
|
+
</Tip>
|
|
68
|
+
|
|
69
|
+
## Next steps
|
|
70
|
+
|
|
71
|
+
<CardGroup cols={2}>
|
|
72
|
+
<Card title="Generate tests with AI" icon="compass" href="/generating-tests">
|
|
73
|
+
Prompt the agent and steer it while it works.
|
|
74
|
+
</Card>
|
|
75
|
+
<Card title="Make assertions" icon="circle-check" href="/making-assertions">
|
|
76
|
+
Check what's on screen in plain language.
|
|
77
|
+
</Card>
|
|
78
|
+
<Card title="Run tests" icon="play" href="/copilot/running-tests">
|
|
79
|
+
Run your tests locally and choose a device.
|
|
80
|
+
</Card>
|
|
81
|
+
<Card title="Run in CI/CD" icon="code-branch" href="/ci-cd">
|
|
82
|
+
Run your tests on every pull request.
|
|
83
|
+
</Card>
|
|
84
|
+
</CardGroup>
|