testdriverai 7.0.0 → 7.1.0
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/AGENTS.md +550 -0
- package/CODEOWNERS +0 -1
- package/README.md +126 -0
- package/agent/index.js +43 -18
- package/agent/lib/commands.js +794 -135
- package/agent/lib/redraw.js +124 -39
- package/agent/lib/sandbox.js +10 -1
- package/agent/lib/sdk.js +21 -0
- package/docs/MIGRATION.md +425 -0
- package/docs/PRESETS.md +210 -0
- package/docs/docs.json +91 -37
- package/docs/guide/best-practices-polling.mdx +154 -0
- package/docs/v7/api/dashcam.mdx +497 -0
- package/docs/v7/api/doubleClick.mdx +102 -0
- package/docs/v7/api/mouseDown.mdx +161 -0
- package/docs/v7/api/mouseUp.mdx +164 -0
- package/docs/v7/api/rightClick.mdx +123 -0
- package/docs/v7/getting-started/configuration.mdx +380 -0
- package/docs/v7/getting-started/quickstart.mdx +273 -140
- package/docs/v7/guides/best-practices.mdx +486 -0
- package/docs/v7/guides/caching-ai.mdx +215 -0
- package/docs/v7/guides/caching-selectors.mdx +292 -0
- package/docs/v7/guides/caching.mdx +366 -0
- package/docs/v7/guides/ci-cd/azure.mdx +587 -0
- package/docs/v7/guides/ci-cd/circleci.mdx +523 -0
- package/docs/v7/guides/ci-cd/github-actions.mdx +457 -0
- package/docs/v7/guides/ci-cd/gitlab.mdx +498 -0
- package/docs/v7/guides/ci-cd/jenkins.mdx +664 -0
- package/docs/v7/guides/ci-cd/travis.mdx +438 -0
- package/docs/v7/guides/debugging.mdx +349 -0
- package/docs/v7/guides/faq.mdx +393 -0
- package/docs/v7/guides/performance.mdx +517 -0
- package/docs/v7/guides/troubleshooting.mdx +526 -0
- package/docs/v7/guides/vitest-plugin.mdx +477 -0
- package/docs/v7/guides/vitest.mdx +535 -0
- package/docs/v7/platforms/linux.mdx +308 -0
- package/docs/v7/platforms/macos.mdx +433 -0
- package/docs/v7/platforms/windows.mdx +430 -0
- package/docs/v7/presets/chrome-extension.mdx +223 -0
- package/docs/v7/presets/chrome.mdx +287 -0
- package/docs/v7/presets/electron.mdx +435 -0
- package/docs/v7/presets/vscode.mdx +398 -0
- package/docs/v7/presets/webapp.mdx +396 -0
- package/docs/v7/progressive-apis/CORE.md +459 -0
- package/docs/v7/progressive-apis/HOOKS.md +360 -0
- package/docs/v7/progressive-apis/PROGRESSIVE_DISCLOSURE.md +230 -0
- package/docs/v7/progressive-apis/PROVISION.md +266 -0
- package/interfaces/vitest-plugin.mjs +186 -100
- package/package.json +12 -1
- package/sdk.d.ts +335 -42
- package/sdk.js +756 -95
- package/src/core/Dashcam.js +469 -0
- package/src/core/index.d.ts +150 -0
- package/src/core/index.js +12 -0
- package/src/presets/index.mjs +331 -0
- package/src/vitest/extended.mjs +108 -0
- package/src/vitest/hooks.d.ts +119 -0
- package/src/vitest/hooks.mjs +298 -0
- package/src/vitest/index.mjs +64 -0
- package/src/vitest/lifecycle.mjs +277 -0
- package/src/vitest/utils.mjs +150 -0
- package/test/dashcam.test.js +137 -0
- package/testdriver/acceptance-sdk/assert.test.mjs +13 -31
- package/testdriver/acceptance-sdk/auto-cache-key-demo.test.mjs +56 -0
- package/testdriver/acceptance-sdk/chrome-extension.test.mjs +89 -0
- package/testdriver/acceptance-sdk/drag-and-drop.test.mjs +7 -19
- package/testdriver/acceptance-sdk/element-not-found.test.mjs +6 -19
- package/testdriver/acceptance-sdk/exec-js.test.mjs +6 -18
- package/testdriver/acceptance-sdk/exec-output.test.mjs +8 -20
- package/testdriver/acceptance-sdk/exec-pwsh.test.mjs +13 -25
- package/testdriver/acceptance-sdk/focus-window.test.mjs +8 -20
- package/testdriver/acceptance-sdk/formatted-logging.test.mjs +5 -20
- package/testdriver/acceptance-sdk/hooks-example.test.mjs +38 -0
- package/testdriver/acceptance-sdk/hover-image.test.mjs +10 -19
- package/testdriver/acceptance-sdk/hover-text-with-description.test.mjs +7 -19
- package/testdriver/acceptance-sdk/hover-text.test.mjs +5 -19
- package/testdriver/acceptance-sdk/match-image.test.mjs +7 -19
- package/testdriver/acceptance-sdk/presets-example.test.mjs +87 -0
- package/testdriver/acceptance-sdk/press-keys.test.mjs +5 -19
- package/testdriver/acceptance-sdk/prompt.test.mjs +6 -18
- package/testdriver/acceptance-sdk/scroll-keyboard.test.mjs +6 -20
- package/testdriver/acceptance-sdk/scroll-until-image.test.mjs +6 -18
- package/testdriver/acceptance-sdk/scroll-until-text.test.mjs +9 -23
- package/testdriver/acceptance-sdk/scroll.test.mjs +12 -21
- package/testdriver/acceptance-sdk/setup/testHelpers.mjs +124 -352
- package/testdriver/acceptance-sdk/sully-ai.test.mjs +234 -0
- package/testdriver/acceptance-sdk/test-console-logs.test.mjs +42 -0
- package/testdriver/acceptance-sdk/type.test.mjs +19 -58
- package/vitest.config.mjs +1 -0
- package/.vscode/mcp.json +0 -9
- package/MIGRATION.md +0 -389
- package/PLUGIN_MIGRATION.md +0 -222
- package/PROMPT_CACHE.md +0 -200
- package/SDK_LOGGING.md +0 -222
- package/SDK_MIGRATION.md +0 -474
- package/SDK_README.md +0 -1122
- package/debug-screenshot-1763401388589.png +0 -0
- package/examples/run-tests-with-recording.sh +0 -70
- package/examples/screenshot-example.js +0 -63
- package/examples/sdk-awesome-logs-demo.js +0 -177
- package/examples/sdk-cache-thresholds.js +0 -96
- package/examples/sdk-element-properties.js +0 -155
- package/examples/sdk-simple-example.js +0 -65
- package/examples/test-recording-example.test.js +0 -166
- package/mcp-server/AI_GUIDELINES.md +0 -57
- package/test-find-api.js +0 -73
- package/test-prompt-cache.js +0 -96
- package/test-sandbox-render.js +0 -28
- package/test-sdk-methods.js +0 -15
- package/test-sdk-refactor.js +0 -53
- package/test-stack-trace.mjs +0 -57
- package/testdriver/acceptance-sdk/setup/lifecycleHelpers.mjs +0 -239
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "CircleCI"
|
|
3
|
+
description: "Run TestDriver tests in CircleCI"
|
|
4
|
+
icon: "circle"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Basic Setup
|
|
8
|
+
|
|
9
|
+
Create `.circleci/config.yml`:
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
version: 2.1
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
test:
|
|
16
|
+
docker:
|
|
17
|
+
- image: cimg/node:18.0
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- checkout
|
|
21
|
+
|
|
22
|
+
- restore_cache:
|
|
23
|
+
keys:
|
|
24
|
+
- v1-deps-{{ checksum "package-lock.json" }}
|
|
25
|
+
- v1-deps-
|
|
26
|
+
|
|
27
|
+
- run:
|
|
28
|
+
name: Install dependencies
|
|
29
|
+
command: npm ci
|
|
30
|
+
|
|
31
|
+
- save_cache:
|
|
32
|
+
key: v1-deps-{{ checksum "package-lock.json" }}
|
|
33
|
+
paths:
|
|
34
|
+
- node_modules
|
|
35
|
+
|
|
36
|
+
- run:
|
|
37
|
+
name: Run tests
|
|
38
|
+
command: npx vitest
|
|
39
|
+
environment:
|
|
40
|
+
TD_API_KEY: $TD_API_KEY
|
|
41
|
+
|
|
42
|
+
- store_artifacts:
|
|
43
|
+
path: test-results
|
|
44
|
+
|
|
45
|
+
- store_test_results:
|
|
46
|
+
path: test-results
|
|
47
|
+
|
|
48
|
+
workflows:
|
|
49
|
+
test:
|
|
50
|
+
jobs:
|
|
51
|
+
- test
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Add API Key
|
|
55
|
+
|
|
56
|
+
1. Go to **Project Settings** → **Environment Variables**
|
|
57
|
+
2. Click **Add Environment Variable**
|
|
58
|
+
3. Name: `TD_API_KEY`
|
|
59
|
+
4. Value: Your API key from [dashboard.testdriver.ai](https://dashboard.testdriver.ai)
|
|
60
|
+
5. Click **Add Variable**
|
|
61
|
+
|
|
62
|
+
## Parallel Tests
|
|
63
|
+
|
|
64
|
+
Use CircleCI's parallelism feature:
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
version: 2.1
|
|
68
|
+
|
|
69
|
+
jobs:
|
|
70
|
+
test:
|
|
71
|
+
docker:
|
|
72
|
+
- image: cimg/node:18.0
|
|
73
|
+
parallelism: 4
|
|
74
|
+
|
|
75
|
+
steps:
|
|
76
|
+
- checkout
|
|
77
|
+
|
|
78
|
+
- restore_cache:
|
|
79
|
+
keys:
|
|
80
|
+
- v1-deps-{{ checksum "package-lock.json" }}
|
|
81
|
+
|
|
82
|
+
- run: npm ci
|
|
83
|
+
|
|
84
|
+
- save_cache:
|
|
85
|
+
key: v1-deps-{{ checksum "package-lock.json" }}
|
|
86
|
+
paths:
|
|
87
|
+
- node_modules
|
|
88
|
+
|
|
89
|
+
- run:
|
|
90
|
+
name: Run tests (shard $CIRCLE_NODE_INDEX/$CIRCLE_NODE_TOTAL)
|
|
91
|
+
command: npx vitest --shard=$CIRCLE_NODE_INDEX/$CIRCLE_NODE_TOTAL
|
|
92
|
+
|
|
93
|
+
- store_test_results:
|
|
94
|
+
path: test-results
|
|
95
|
+
|
|
96
|
+
workflows:
|
|
97
|
+
test:
|
|
98
|
+
jobs:
|
|
99
|
+
- test
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
This runs 4 test shards in parallel.
|
|
103
|
+
|
|
104
|
+
## Save Dashcam URLs
|
|
105
|
+
|
|
106
|
+
Extract replay URLs:
|
|
107
|
+
|
|
108
|
+
```yaml
|
|
109
|
+
- run:
|
|
110
|
+
name: Run tests
|
|
111
|
+
command: npx vitest 2>&1 | tee test-output.log
|
|
112
|
+
|
|
113
|
+
- run:
|
|
114
|
+
name: Extract Dashcam URLs
|
|
115
|
+
when: always
|
|
116
|
+
command: |
|
|
117
|
+
grep -o 'https://dashcam.testdriver.ai/[a-zA-Z0-9-]*' test-output.log > dashcam-urls.txt || true
|
|
118
|
+
|
|
119
|
+
- store_artifacts:
|
|
120
|
+
path: test-output.log
|
|
121
|
+
|
|
122
|
+
- store_artifacts:
|
|
123
|
+
path: dashcam-urls.txt
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Scheduled Tests
|
|
127
|
+
|
|
128
|
+
Run tests on schedule:
|
|
129
|
+
|
|
130
|
+
```yaml
|
|
131
|
+
workflows:
|
|
132
|
+
version: 2
|
|
133
|
+
|
|
134
|
+
# Run on every commit
|
|
135
|
+
test:
|
|
136
|
+
jobs:
|
|
137
|
+
- test
|
|
138
|
+
|
|
139
|
+
# Run nightly at 2 AM
|
|
140
|
+
nightly:
|
|
141
|
+
triggers:
|
|
142
|
+
- schedule:
|
|
143
|
+
cron: "0 2 * * *"
|
|
144
|
+
filters:
|
|
145
|
+
branches:
|
|
146
|
+
only:
|
|
147
|
+
- main
|
|
148
|
+
jobs:
|
|
149
|
+
- test
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Multiple Node Versions
|
|
153
|
+
|
|
154
|
+
Test across Node.js versions:
|
|
155
|
+
|
|
156
|
+
```yaml
|
|
157
|
+
version: 2.1
|
|
158
|
+
|
|
159
|
+
jobs:
|
|
160
|
+
test:
|
|
161
|
+
parameters:
|
|
162
|
+
node-version:
|
|
163
|
+
type: string
|
|
164
|
+
|
|
165
|
+
docker:
|
|
166
|
+
- image: cimg/node:<< parameters.node-version >>
|
|
167
|
+
|
|
168
|
+
steps:
|
|
169
|
+
- checkout
|
|
170
|
+
- run: npm ci
|
|
171
|
+
- run: npx vitest
|
|
172
|
+
|
|
173
|
+
workflows:
|
|
174
|
+
test-all:
|
|
175
|
+
jobs:
|
|
176
|
+
- test:
|
|
177
|
+
matrix:
|
|
178
|
+
parameters:
|
|
179
|
+
node-version: ["16.0", "18.0", "20.0"]
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Orbs
|
|
183
|
+
|
|
184
|
+
Use CircleCI orbs for common tasks:
|
|
185
|
+
|
|
186
|
+
```yaml
|
|
187
|
+
version: 2.1
|
|
188
|
+
|
|
189
|
+
orbs:
|
|
190
|
+
node: circleci/node@5.1.0
|
|
191
|
+
|
|
192
|
+
jobs:
|
|
193
|
+
test:
|
|
194
|
+
docker:
|
|
195
|
+
- image: cimg/node:18.0
|
|
196
|
+
|
|
197
|
+
steps:
|
|
198
|
+
- checkout
|
|
199
|
+
|
|
200
|
+
- node/install-packages:
|
|
201
|
+
pkg-manager: npm
|
|
202
|
+
|
|
203
|
+
- run:
|
|
204
|
+
name: Run tests
|
|
205
|
+
command: npx vitest
|
|
206
|
+
environment:
|
|
207
|
+
TD_API_KEY: $TD_API_KEY
|
|
208
|
+
|
|
209
|
+
- store_test_results:
|
|
210
|
+
path: test-results
|
|
211
|
+
|
|
212
|
+
workflows:
|
|
213
|
+
test:
|
|
214
|
+
jobs:
|
|
215
|
+
- test
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Conditional Execution
|
|
219
|
+
|
|
220
|
+
Skip tests on documentation changes:
|
|
221
|
+
|
|
222
|
+
```yaml
|
|
223
|
+
workflows:
|
|
224
|
+
test:
|
|
225
|
+
jobs:
|
|
226
|
+
- test:
|
|
227
|
+
filters:
|
|
228
|
+
branches:
|
|
229
|
+
ignore:
|
|
230
|
+
- /docs\/.*/
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Or use CircleCI API to detect changes:
|
|
234
|
+
|
|
235
|
+
```yaml
|
|
236
|
+
- run:
|
|
237
|
+
name: Check for code changes
|
|
238
|
+
command: |
|
|
239
|
+
if git diff --name-only HEAD~1 | grep -qE '^(src|test)/'; then
|
|
240
|
+
echo "Code changed, running tests"
|
|
241
|
+
else
|
|
242
|
+
echo "Only docs changed, skipping tests"
|
|
243
|
+
circleci step halt
|
|
244
|
+
fi
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Resource Classes
|
|
248
|
+
|
|
249
|
+
Use larger machines for faster tests:
|
|
250
|
+
|
|
251
|
+
```yaml
|
|
252
|
+
jobs:
|
|
253
|
+
test:
|
|
254
|
+
docker:
|
|
255
|
+
- image: cimg/node:18.0
|
|
256
|
+
resource_class: large # 4 vCPUs, 8GB RAM
|
|
257
|
+
|
|
258
|
+
steps:
|
|
259
|
+
- checkout
|
|
260
|
+
- run: npm ci
|
|
261
|
+
- run: npx vitest
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Available classes:
|
|
265
|
+
- `small` - 1 vCPU, 2GB RAM
|
|
266
|
+
- `medium` (default) - 2 vCPUs, 4GB RAM
|
|
267
|
+
- `medium+` - 3 vCPUs, 6GB RAM
|
|
268
|
+
- `large` - 4 vCPUs, 8GB RAM
|
|
269
|
+
- `xlarge` - 8 vCPUs, 16GB RAM
|
|
270
|
+
|
|
271
|
+
## Retry Failed Tests
|
|
272
|
+
|
|
273
|
+
Automatically retry on failure:
|
|
274
|
+
|
|
275
|
+
```yaml
|
|
276
|
+
- run:
|
|
277
|
+
name: Run tests
|
|
278
|
+
command: npx vitest
|
|
279
|
+
no_output_timeout: 30m
|
|
280
|
+
when: always
|
|
281
|
+
|
|
282
|
+
- run:
|
|
283
|
+
name: Retry failed tests
|
|
284
|
+
command: npx vitest --retry=2
|
|
285
|
+
when: on_fail
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## Save Test Results
|
|
289
|
+
|
|
290
|
+
Store JUnit XML for CircleCI dashboard:
|
|
291
|
+
|
|
292
|
+
```yaml
|
|
293
|
+
- run:
|
|
294
|
+
name: Run tests
|
|
295
|
+
command: npx vitest
|
|
296
|
+
|
|
297
|
+
- store_test_results:
|
|
298
|
+
path: test-results
|
|
299
|
+
|
|
300
|
+
- store_artifacts:
|
|
301
|
+
path: test-results
|
|
302
|
+
destination: test-results
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
Requires JUnit reporter in `vitest.config.mjs`:
|
|
306
|
+
|
|
307
|
+
```javascript
|
|
308
|
+
export default defineConfig({
|
|
309
|
+
test: {
|
|
310
|
+
reporters: ['default', 'junit'],
|
|
311
|
+
outputFile: {
|
|
312
|
+
junit: './test-results/junit.xml'
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
## Workspaces
|
|
319
|
+
|
|
320
|
+
Share data between jobs:
|
|
321
|
+
|
|
322
|
+
```yaml
|
|
323
|
+
version: 2.1
|
|
324
|
+
|
|
325
|
+
jobs:
|
|
326
|
+
build:
|
|
327
|
+
docker:
|
|
328
|
+
- image: cimg/node:18.0
|
|
329
|
+
steps:
|
|
330
|
+
- checkout
|
|
331
|
+
- run: npm ci
|
|
332
|
+
- persist_to_workspace:
|
|
333
|
+
root: .
|
|
334
|
+
paths:
|
|
335
|
+
- node_modules
|
|
336
|
+
|
|
337
|
+
test:
|
|
338
|
+
docker:
|
|
339
|
+
- image: cimg/node:18.0
|
|
340
|
+
steps:
|
|
341
|
+
- checkout
|
|
342
|
+
- attach_workspace:
|
|
343
|
+
at: .
|
|
344
|
+
- run: npx vitest
|
|
345
|
+
|
|
346
|
+
workflows:
|
|
347
|
+
build-and-test:
|
|
348
|
+
jobs:
|
|
349
|
+
- build
|
|
350
|
+
- test:
|
|
351
|
+
requires:
|
|
352
|
+
- build
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
## Approval Jobs
|
|
356
|
+
|
|
357
|
+
Add manual approval step:
|
|
358
|
+
|
|
359
|
+
```yaml
|
|
360
|
+
workflows:
|
|
361
|
+
test:
|
|
362
|
+
jobs:
|
|
363
|
+
- test
|
|
364
|
+
- hold:
|
|
365
|
+
type: approval
|
|
366
|
+
requires:
|
|
367
|
+
- test
|
|
368
|
+
- deploy:
|
|
369
|
+
requires:
|
|
370
|
+
- hold
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
## Troubleshooting
|
|
374
|
+
|
|
375
|
+
### Tests timeout
|
|
376
|
+
|
|
377
|
+
Increase timeout:
|
|
378
|
+
|
|
379
|
+
```yaml
|
|
380
|
+
- run:
|
|
381
|
+
name: Run tests
|
|
382
|
+
command: npx vitest
|
|
383
|
+
no_output_timeout: 30m
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### Out of memory
|
|
387
|
+
|
|
388
|
+
Use larger resource class:
|
|
389
|
+
|
|
390
|
+
```yaml
|
|
391
|
+
jobs:
|
|
392
|
+
test:
|
|
393
|
+
resource_class: large
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
Or reduce parallelism in tests:
|
|
397
|
+
|
|
398
|
+
```javascript
|
|
399
|
+
// vitest.config.mjs
|
|
400
|
+
export default defineConfig({
|
|
401
|
+
test: {
|
|
402
|
+
maxConcurrency: 3
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
### API key not found
|
|
408
|
+
|
|
409
|
+
Debug environment:
|
|
410
|
+
|
|
411
|
+
```yaml
|
|
412
|
+
- run:
|
|
413
|
+
name: Debug
|
|
414
|
+
command: |
|
|
415
|
+
echo "Has TD_API_KEY: ${TD_API_KEY:+yes}"
|
|
416
|
+
node --version
|
|
417
|
+
npm --version
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
## Complete Example
|
|
421
|
+
|
|
422
|
+
Full-featured configuration:
|
|
423
|
+
|
|
424
|
+
```yaml
|
|
425
|
+
version: 2.1
|
|
426
|
+
|
|
427
|
+
orbs:
|
|
428
|
+
node: circleci/node@5.1.0
|
|
429
|
+
|
|
430
|
+
jobs:
|
|
431
|
+
test:
|
|
432
|
+
docker:
|
|
433
|
+
- image: cimg/node:18.0
|
|
434
|
+
|
|
435
|
+
resource_class: large
|
|
436
|
+
parallelism: 4
|
|
437
|
+
|
|
438
|
+
steps:
|
|
439
|
+
- checkout
|
|
440
|
+
|
|
441
|
+
- restore_cache:
|
|
442
|
+
keys:
|
|
443
|
+
- v1-deps-{{ checksum "package-lock.json" }}
|
|
444
|
+
- v1-deps-
|
|
445
|
+
|
|
446
|
+
- run:
|
|
447
|
+
name: Install dependencies
|
|
448
|
+
command: npm ci
|
|
449
|
+
|
|
450
|
+
- save_cache:
|
|
451
|
+
key: v1-deps-{{ checksum "package-lock.json" }}
|
|
452
|
+
paths:
|
|
453
|
+
- node_modules
|
|
454
|
+
|
|
455
|
+
- run:
|
|
456
|
+
name: Run tests (shard $CIRCLE_NODE_INDEX/$CIRCLE_NODE_TOTAL)
|
|
457
|
+
command: npx vitest --shard=$CIRCLE_NODE_INDEX/$CIRCLE_NODE_TOTAL 2>&1 | tee test-output.log
|
|
458
|
+
environment:
|
|
459
|
+
TD_API_KEY: $TD_API_KEY
|
|
460
|
+
no_output_timeout: 30m
|
|
461
|
+
|
|
462
|
+
- run:
|
|
463
|
+
name: Extract Dashcam URLs
|
|
464
|
+
when: always
|
|
465
|
+
command: |
|
|
466
|
+
grep -o 'https://dashcam.testdriver.ai/[a-zA-Z0-9-]*' test-output.log > dashcam-urls.txt || true
|
|
467
|
+
|
|
468
|
+
- store_test_results:
|
|
469
|
+
path: test-results
|
|
470
|
+
|
|
471
|
+
- store_artifacts:
|
|
472
|
+
path: test-results
|
|
473
|
+
destination: test-results
|
|
474
|
+
|
|
475
|
+
- store_artifacts:
|
|
476
|
+
path: test-output.log
|
|
477
|
+
destination: logs
|
|
478
|
+
|
|
479
|
+
- store_artifacts:
|
|
480
|
+
path: dashcam-urls.txt
|
|
481
|
+
destination: dashcam-urls
|
|
482
|
+
|
|
483
|
+
workflows:
|
|
484
|
+
version: 2
|
|
485
|
+
|
|
486
|
+
test:
|
|
487
|
+
jobs:
|
|
488
|
+
- test:
|
|
489
|
+
filters:
|
|
490
|
+
branches:
|
|
491
|
+
ignore:
|
|
492
|
+
- /docs\/.*/
|
|
493
|
+
|
|
494
|
+
nightly:
|
|
495
|
+
triggers:
|
|
496
|
+
- schedule:
|
|
497
|
+
cron: "0 2 * * *"
|
|
498
|
+
filters:
|
|
499
|
+
branches:
|
|
500
|
+
only: main
|
|
501
|
+
jobs:
|
|
502
|
+
- test
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
## See Also
|
|
506
|
+
|
|
507
|
+
<CardGroup cols={2}>
|
|
508
|
+
<Card title="CI/CD Overview" icon="arrows-spin" href="/v7/guides/ci-cd/overview">
|
|
509
|
+
CI/CD concepts
|
|
510
|
+
</Card>
|
|
511
|
+
|
|
512
|
+
<Card title="Performance" icon="gauge" href="/v7/guides/performance">
|
|
513
|
+
Optimize tests
|
|
514
|
+
</Card>
|
|
515
|
+
|
|
516
|
+
<Card title="Troubleshooting" icon="circle-question" href="/v7/guides/troubleshooting">
|
|
517
|
+
Common issues
|
|
518
|
+
</Card>
|
|
519
|
+
|
|
520
|
+
<Card title="CircleCI Docs" icon="book" href="https://circleci.com/docs/">
|
|
521
|
+
Official docs
|
|
522
|
+
</Card>
|
|
523
|
+
</CardGroup>
|