testdriverai 7.1.4 → 7.2.2

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.
Files changed (72) hide show
  1. package/.github/workflows/acceptance.yaml +81 -0
  2. package/.github/workflows/publish.yaml +44 -0
  3. package/agent/index.js +18 -19
  4. package/agent/interface.js +4 -0
  5. package/agent/lib/commands.js +321 -121
  6. package/agent/lib/redraw.js +99 -39
  7. package/agent/lib/sandbox.js +98 -6
  8. package/agent/lib/sdk.js +25 -0
  9. package/agent/lib/system.js +2 -1
  10. package/agent/lib/validation.js +6 -6
  11. package/docs/docs.json +211 -101
  12. package/docs/snippets/tests/type-repeated-replay.mdx +1 -1
  13. package/docs/v7/_drafts/caching-selectors.mdx +24 -0
  14. package/docs/v7/api/act.mdx +1 -1
  15. package/docs/v7/api/assert.mdx +1 -1
  16. package/docs/v7/api/assertions.mdx +7 -7
  17. package/docs/v7/api/elements.mdx +78 -0
  18. package/docs/v7/api/find.mdx +38 -0
  19. package/docs/v7/api/focusApplication.mdx +2 -2
  20. package/docs/v7/api/hover.mdx +2 -2
  21. package/docs/v7/features/ai-native.mdx +57 -71
  22. package/docs/v7/features/application-logs.mdx +353 -0
  23. package/docs/v7/features/browser-logs.mdx +414 -0
  24. package/docs/v7/features/cache-management.mdx +402 -0
  25. package/docs/v7/features/continuous-testing.mdx +346 -0
  26. package/docs/v7/features/coverage.mdx +508 -0
  27. package/docs/v7/features/data-driven-testing.mdx +441 -0
  28. package/docs/v7/features/easy-to-write.mdx +2 -73
  29. package/docs/v7/features/enterprise.mdx +155 -39
  30. package/docs/v7/features/fast.mdx +63 -81
  31. package/docs/v7/features/managed-sandboxes.mdx +384 -0
  32. package/docs/v7/features/network-monitoring.mdx +568 -0
  33. package/docs/v7/features/observable.mdx +3 -22
  34. package/docs/v7/features/parallel-execution.mdx +381 -0
  35. package/docs/v7/features/powerful.mdx +1 -1
  36. package/docs/v7/features/reports.mdx +414 -0
  37. package/docs/v7/features/sandbox-customization.mdx +229 -0
  38. package/docs/v7/features/scalable.mdx +217 -2
  39. package/docs/v7/features/stable.mdx +106 -147
  40. package/docs/v7/features/system-performance.mdx +616 -0
  41. package/docs/v7/features/test-analytics.mdx +373 -0
  42. package/docs/v7/features/test-cases.mdx +393 -0
  43. package/docs/v7/features/test-replays.mdx +408 -0
  44. package/docs/v7/features/test-reports.mdx +308 -0
  45. package/docs/v7/getting-started/{running-and-debugging.mdx → debugging-tests.mdx} +12 -142
  46. package/docs/v7/getting-started/quickstart.mdx +22 -305
  47. package/docs/v7/getting-started/running-tests.mdx +173 -0
  48. package/docs/v7/overview/what-is-testdriver.mdx +2 -14
  49. package/docs/v7/presets/chrome-extension.mdx +147 -122
  50. package/interfaces/cli/commands/init.js +3 -3
  51. package/interfaces/cli/lib/base.js +3 -2
  52. package/interfaces/logger.js +0 -2
  53. package/interfaces/shared-test-state.mjs +0 -5
  54. package/interfaces/vitest-plugin.mjs +70 -50
  55. package/lib/core/Dashcam.js +60 -85
  56. package/lib/vitest/hooks.mjs +42 -50
  57. package/package.json +1 -1
  58. package/sdk-log-formatter.js +350 -175
  59. package/sdk.d.ts +36 -3
  60. package/sdk.js +431 -116
  61. package/setup/aws/cloudformation.yaml +2 -2
  62. package/setup/aws/self-hosted.yml +1 -1
  63. package/test/testdriver/chrome-extension.test.mjs +55 -72
  64. package/test/testdriver/element-not-found.test.mjs +2 -1
  65. package/test/testdriver/hover-image.test.mjs +1 -1
  66. package/test/testdriver/scroll-until-text.test.mjs +10 -6
  67. package/test/testdriver/setup/lifecycleHelpers.mjs +19 -24
  68. package/test/testdriver/setup/testHelpers.mjs +18 -23
  69. package/vitest.config.mjs +3 -3
  70. package/.github/workflows/linux-tests.yml +0 -28
  71. package/docs/v7/getting-started/generating-tests.mdx +0 -525
  72. package/test/testdriver/auto-cache-key-demo.test.mjs +0 -56
@@ -0,0 +1,568 @@
1
+ ---
2
+ title: "Network Monitoring"
3
+ description: "HTTP requests, responses, timing, and HAR file analysis"
4
+ icon: "network-wired"
5
+ ---
6
+
7
+ Track all network activity including HTTP requests, responses, status codes, timing waterfall, and data transfer for complete visibility into API calls and resource loading.
8
+
9
+ ## Network Activity Dashboard
10
+
11
+ View all HTTP requests in your test:
12
+
13
+ ```
14
+ Network Activity:
15
+ ┌────────────────────────────────────────────────────────────────────┐
16
+ │ Method URL Status Time Size │
17
+ ├────────────────────────────────────────────────────────────────────┤
18
+ │ GET /api/user/123 200 234ms 2.4 KB │
19
+ │ POST /api/login 200 156ms 1.1 KB │
20
+ │ GET /api/dashboard/data 200 445ms 12.3 KB │
21
+ │ GET /assets/app.js 200 89ms 234 KB │
22
+ │ GET /assets/styles.css 200 67ms 45 KB │
23
+ │ GET /api/notifications 304 123ms 0 B │
24
+ │ POST /api/settings 400 201ms 0.8 KB │
25
+ │ GET /api/profile/avatar.jpg 200 334ms 156 KB │
26
+ │ WS ws://api.example.com/live 101 - - │
27
+ └────────────────────────────────────────────────────────────────────┘
28
+
29
+ Total Requests: 9
30
+ Downloaded: 451.6 KB
31
+ Uploaded: 5.2 KB
32
+ Total Time: 1.649s
33
+ ```
34
+
35
+ ## Request Details
36
+
37
+ Complete information for each request:
38
+
39
+ ```
40
+ Request Details: POST /api/login
41
+ ┌────────────────────────────────────────────────────┐
42
+ │ General Information: │
43
+ │ URL: https://api.example.com/api/login │
44
+ │ Method: POST │
45
+ │ Status: 200 OK │
46
+ │ Remote Address: 172.217.14.206:443 │
47
+ │ Protocol: HTTP/2.0 │
48
+ │ │
49
+ │ Timing: │
50
+ │ ├─ DNS Lookup: 12ms │
51
+ │ ├─ TCP Connect: 45ms │
52
+ │ ├─ TLS Handshake: 67ms │
53
+ │ ├─ Request Sent: 3ms │
54
+ │ ├─ Waiting (TTFB): 89ms │
55
+ │ └─ Content Download: 12ms │
56
+ │ Total: 156ms │
57
+ │ │
58
+ │ Request Headers: │
59
+ │ Accept: application/json │
60
+ │ Content-Type: application/json │
61
+ │ Authorization: Bearer eyJ0eXAiOiJKV1Q... │
62
+ │ User-Agent: Mozilla/5.0... │
63
+ │ │
64
+ │ Request Payload: │
65
+ │ { │
66
+ │ "email": "user@example.com", │
67
+ │ "password": "********" │
68
+ │ } │
69
+ │ │
70
+ │ Response Headers: │
71
+ │ Content-Type: application/json; charset=utf-8 │
72
+ │ Cache-Control: no-cache, no-store │
73
+ │ Set-Cookie: session=abc123; HttpOnly; Secure │
74
+ │ X-RateLimit-Remaining: 98 │
75
+ │ │
76
+ │ Response Body: │
77
+ │ { │
78
+ │ "success": true, │
79
+ │ "user": { │
80
+ │ "id": 123, │
81
+ │ "email": "user@example.com", │
82
+ │ "name": "John Doe" │
83
+ │ }, │
84
+ │ "token": "eyJ0eXAiOiJKV1QiL..." │
85
+ │ } │
86
+ └────────────────────────────────────────────────────┘
87
+ ```
88
+
89
+ ## Network Waterfall
90
+
91
+ Visual timeline of all requests:
92
+
93
+ ```
94
+ Network Waterfall (0s → 2s):
95
+ ┌────────────────────────────────────────────────────────────────────┐
96
+ │ 0.0s 0.5s 1.0s 1.5s 2.0s │
97
+ │ │ │ │ │ │ │
98
+ │ ████████ /api/login (156ms) │
99
+ │ ████████████ /assets/app.js │
100
+ │ ██████ /assets/styles.css │
101
+ │ ██████████████ /api/user/123 │
102
+ │ ████████████████████ /api/dashboard/data │
103
+ │ ██████ /api/notifications │
104
+ │ ████████ /api/profile/avatar │
105
+ │ ████████ /api/settings (400) │
106
+ │ │
107
+ │ Legend: │
108
+ │ ▓ Queued/Stalled █ Request █ Response █ Download │
109
+ └────────────────────────────────────────────────────────────────────┘
110
+ ```
111
+
112
+ ## HTTP Status Codes
113
+
114
+ Track response status codes:
115
+
116
+ <CardGroup cols={2}>
117
+ <Card title="2xx Success" icon="check" color="green">
118
+ ```
119
+ 200 OK (6 requests)
120
+ 201 Created (1 request)
121
+ 204 No Content (0 requests)
122
+ 304 Not Modified (1 request)
123
+ ```
124
+ </Card>
125
+
126
+ <Card title="3xx Redirects" icon="arrows-turn-right" color="blue">
127
+ ```
128
+ 301 Moved Permanently (0)
129
+ 302 Found (0)
130
+ 304 Not Modified (1)
131
+ 307 Temporary Redirect (0)
132
+ ```
133
+ </Card>
134
+
135
+ <Card title="4xx Client Errors" icon="triangle-exclamation" color="yellow">
136
+ ```
137
+ 400 Bad Request (1 request)
138
+ 401 Unauthorized (0 requests)
139
+ 403 Forbidden (0 requests)
140
+ 404 Not Found (0 requests)
141
+ 429 Too Many Requests (0)
142
+ ```
143
+ </Card>
144
+
145
+ <Card title="5xx Server Errors" icon="circle-xmark" color="red">
146
+ ```
147
+ 500 Internal Server Error (0)
148
+ 502 Bad Gateway (0)
149
+ 503 Service Unavailable (0)
150
+ 504 Gateway Timeout (0)
151
+ ```
152
+ </Card>
153
+ </CardGroup>
154
+
155
+ ## Request/Response Types
156
+
157
+ Monitor different content types:
158
+
159
+ <Tabs>
160
+ <Tab title="API Calls (JSON)">
161
+ ```
162
+ API Requests:
163
+ ┌────────────────────────────────────────────────┐
164
+ │ POST /api/login 156ms 200 │
165
+ │ GET /api/user/123 234ms 200 │
166
+ │ GET /api/dashboard/data 445ms 200 │
167
+ │ POST /api/settings 201ms 400 │
168
+ │ GET /api/notifications 123ms 304 │
169
+ └────────────────────────────────────────────────┘
170
+
171
+ Total API Calls: 5
172
+ Average Response Time: 231.8ms
173
+ Success Rate: 80% (4/5)
174
+ ```
175
+ </Tab>
176
+
177
+ <Tab title="Static Assets">
178
+ ```
179
+ Static Assets:
180
+ ┌────────────────────────────────────────────────┐
181
+ │ JS /assets/app.js 89ms 234 KB │
182
+ │ CSS /assets/styles.css 67ms 45 KB │
183
+ │ IMG /profile/avatar.jpg 334ms 156 KB │
184
+ │ FONT /fonts/roboto.woff2 112ms 78 KB │
185
+ │ IMG /logo.svg 45ms 12 KB │
186
+ └────────────────────────────────────────────────┘
187
+
188
+ Total Downloaded: 525 KB
189
+ Cache Hit Rate: 20% (1/5 from cache)
190
+ ```
191
+ </Tab>
192
+
193
+ <Tab title="WebSocket">
194
+ ```
195
+ WebSocket Connections:
196
+ ┌────────────────────────────────────────────────┐
197
+ │ ws://api.example.com/live │
198
+ │ │
199
+ │ Status: Connected │
200
+ │ Protocol: WS │
201
+ │ Duration: 2.5s │
202
+ │ │
203
+ │ Messages Sent: 3 │
204
+ │ Messages Received: 7 │
205
+ │ │
206
+ │ [0:12] → {"type":"subscribe","channel":"user"} │
207
+ │ [0:13] ← {"type":"welcome","version":"2.0"} │
208
+ │ [0:15] ← {"type":"notification","count":3} │
209
+ └────────────────────────────────────────────────┘
210
+ ```
211
+ </Tab>
212
+
213
+ <Tab title="GraphQL">
214
+ ```
215
+ GraphQL Operations:
216
+ ┌────────────────────────────────────────────────┐
217
+ │ Query: GetUserProfile 234ms 200 │
218
+ │ Fields: id, name, email, avatar │
219
+ │ Variables: { userId: 123 } │
220
+ │ │
221
+ │ Mutation: UpdateSettings 201ms 400 │
222
+ │ Fields: theme, notifications │
223
+ │ Error: "Invalid theme value" │
224
+ │ │
225
+ │ Query: GetDashboard 445ms 200 │
226
+ │ Fields: stats, recentActivity │
227
+ │ Cached: false │
228
+ └────────────────────────────────────────────────┘
229
+ ```
230
+ </Tab>
231
+ </Tabs>
232
+
233
+ ## Failed Requests
234
+
235
+ Identify and debug failures:
236
+
237
+ ```
238
+ Failed Requests:
239
+ ┌────────────────────────────────────────────────────────────────────┐
240
+ │ POST /api/settings - 400 Bad Request │
241
+ │ │
242
+ │ Request: │
243
+ │ { │
244
+ │ "theme": "invalid_theme", │
245
+ │ "notifications": true │
246
+ │ } │
247
+ │ │
248
+ │ Response: │
249
+ │ { │
250
+ │ "error": "Validation failed", │
251
+ │ "message": "Invalid theme value: invalid_theme", │
252
+ │ "validValues": ["light", "dark", "auto"] │
253
+ │ } │
254
+ │ │
255
+ │ Occurred at: 0:35 in test execution │
256
+ │ Impact: Settings not saved, user preferences unchanged │
257
+ └────────────────────────────────────────────────────────────────────┘
258
+ ```
259
+
260
+ ## CORS Errors
261
+
262
+ Track cross-origin issues:
263
+
264
+ ```
265
+ CORS Errors:
266
+ ┌────────────────────────────────────────────────────────────────────┐
267
+ │ ❌ Cross-Origin Request Blocked │
268
+ │ │
269
+ │ Request URL: https://api.external.com/data │
270
+ │ Origin: https://example.com │
271
+ │ │
272
+ │ Issue: │
273
+ │ The CORS policy blocked this request. No 'Access-Control-Allow- │
274
+ │ Origin' header is present on the requested resource. │
275
+ │ │
276
+ │ Missing Header: │
277
+ │ Access-Control-Allow-Origin │
278
+ │ │
279
+ │ Required Fix: │
280
+ │ Server must include: │
281
+ │ Access-Control-Allow-Origin: https://example.com │
282
+ └────────────────────────────────────────────────────────────────────┘
283
+ ```
284
+
285
+ ## Performance Metrics
286
+
287
+ Analyze request performance:
288
+
289
+ ```
290
+ Performance Summary:
291
+ ┌────────────────────────────────────────────────────┐
292
+ │ Total Requests: 9 │
293
+ │ Total Time: 1.649s │
294
+ │ Downloaded: 451.6 KB │
295
+ │ Uploaded: 5.2 KB │
296
+ │ │
297
+ │ Response Times: │
298
+ │ Fastest: 45ms (/logo.svg) │
299
+ │ Slowest: 445ms (/api/dashboard) │
300
+ │ Average: 183ms │
301
+ │ Median: 156ms │
302
+ │ │
303
+ │ API Performance: │
304
+ │ Average API Time: 231.8ms │
305
+ │ API Success Rate: 80% │
306
+ │ Failed API Calls: 1 │
307
+ │ │
308
+ │ Caching: │
309
+ │ Cache Hit Rate: 11% (1/9) │
310
+ │ Cached Data Saved: 0 B │
311
+ │ │
312
+ │ Recommendations: │
313
+ │ ⚠️ Slow API: /api/dashboard/data (445ms) │
314
+ │ ⚠️ Low cache hit rate - consider caching headers │
315
+ │ ⚠️ Failed request: POST /api/settings │
316
+ └────────────────────────────────────────────────────┘
317
+ ```
318
+
319
+ ## Rate Limiting
320
+
321
+ Monitor API rate limits:
322
+
323
+ ```
324
+ Rate Limit Tracking:
325
+ ┌────────────────────────────────────────────────────┐
326
+ │ API: https://api.example.com │
327
+ │ │
328
+ │ X-RateLimit-Limit: 100 requests/hour │
329
+ │ X-RateLimit-Remaining: 98 requests │
330
+ │ X-RateLimit-Reset: 2024-01-15 15:30:00 │
331
+ │ │
332
+ │ Current Usage: 2/100 (2%) │
333
+ │ Estimated Time to Reset: 45 minutes │
334
+ │ │
335
+ │ Status: ✓ Healthy │
336
+ └────────────────────────────────────────────────────┘
337
+ ```
338
+
339
+ ## Request Filtering
340
+
341
+ Find specific network activity:
342
+
343
+ <Tabs>
344
+ <Tab title="By Method">
345
+ ```
346
+ Show only:
347
+ ☑ GET
348
+ ☑ POST
349
+ ☐ PUT
350
+ ☐ PATCH
351
+ ☐ DELETE
352
+ ☐ OPTIONS
353
+ ```
354
+ </Tab>
355
+
356
+ <Tab title="By Status">
357
+ ```
358
+ Filter by status:
359
+ ☑ 2xx (Success)
360
+ ☑ 3xx (Redirect)
361
+ ☑ 4xx (Client Error)
362
+ ☑ 5xx (Server Error)
363
+
364
+ Specific codes:
365
+ 200, 400, 404, 500
366
+ ```
367
+ </Tab>
368
+
369
+ <Tab title="By URL Pattern">
370
+ ```
371
+ URL contains:
372
+ "/api/"
373
+ "/assets/"
374
+ ".jpg"
375
+
376
+ Regex supported:
377
+ ^/api/(user|settings)
378
+ \.(js|css|png)$
379
+ ```
380
+ </Tab>
381
+
382
+ <Tab title="By Timing">
383
+ ```
384
+ Response time:
385
+ < 100ms (Fast)
386
+ 100-500ms (Normal)
387
+ > 500ms (Slow)
388
+
389
+ Custom range:
390
+ 200ms - 400ms
391
+ ```
392
+ </Tab>
393
+ </Tabs>
394
+
395
+ ## HAR File Export
396
+
397
+ Export complete network data:
398
+
399
+ ```json
400
+ {
401
+ "log": {
402
+ "version": "1.2",
403
+ "creator": {
404
+ "name": "TestDriver",
405
+ "version": "7.0"
406
+ },
407
+ "entries": [
408
+ {
409
+ "startedDateTime": "2024-01-15T14:30:12.345Z",
410
+ "time": 156,
411
+ "request": {
412
+ "method": "POST",
413
+ "url": "https://api.example.com/api/login",
414
+ "httpVersion": "HTTP/2.0",
415
+ "headers": [
416
+ { "name": "Content-Type", "value": "application/json" },
417
+ { "name": "Authorization", "value": "Bearer ..." }
418
+ ],
419
+ "postData": {
420
+ "mimeType": "application/json",
421
+ "text": "{\"email\":\"user@example.com\",\"password\":\"...\"}"
422
+ }
423
+ },
424
+ "response": {
425
+ "status": 200,
426
+ "statusText": "OK",
427
+ "headers": [
428
+ { "name": "Content-Type", "value": "application/json" }
429
+ ],
430
+ "content": {
431
+ "size": 1100,
432
+ "mimeType": "application/json",
433
+ "text": "{\"success\":true,\"user\":{...}}"
434
+ }
435
+ },
436
+ "timings": {
437
+ "dns": 12,
438
+ "connect": 45,
439
+ "ssl": 67,
440
+ "send": 3,
441
+ "wait": 89,
442
+ "receive": 12
443
+ }
444
+ }
445
+ ]
446
+ }
447
+ }
448
+ ```
449
+
450
+ <Tip>
451
+ Import HAR files into Chrome DevTools, Firefox, or online analyzers like Google's HAR Analyzer for advanced visualization.
452
+ </Tip>
453
+
454
+ ## Sensitive Data Protection
455
+
456
+ Credentials automatically redacted:
457
+
458
+ ```
459
+ Request Headers (Sanitized):
460
+ Authorization: Bearer ████████████████
461
+ Cookie: session=████████████████
462
+ X-API-Key: ████████████████
463
+
464
+ Request Body (Sanitized):
465
+ {
466
+ "email": "user@example.com",
467
+ "password": "████████"
468
+ }
469
+
470
+ Response Headers (Sanitized):
471
+ Set-Cookie: session=████████████████; HttpOnly; Secure
472
+ ```
473
+
474
+ <Warning>
475
+ TestDriver automatically redacts sensitive headers like `Authorization`, `Cookie`, and password fields in request bodies.
476
+ </Warning>
477
+
478
+ ## Network Mocking
479
+
480
+ Verify mocked requests:
481
+
482
+ ```javascript
483
+ import { test } from 'vitest';
484
+ import { chrome } from 'testdriverai/presets';
485
+
486
+ test('mock API response', async (context) => {
487
+ const { testdriver, page } = await chrome(context, {
488
+ url: 'https://example.com'
489
+ });
490
+
491
+ // Mock API endpoint
492
+ await page.route('**/api/user/**', route => {
493
+ route.fulfill({
494
+ status: 200,
495
+ body: JSON.stringify({ id: 123, name: 'Mock User' })
496
+ });
497
+ });
498
+
499
+ await testdriver.find('profile button').click();
500
+
501
+ // Network monitoring shows mocked request
502
+ // Replay indicates which requests were mocked
503
+ });
504
+ ```
505
+
506
+ **Replay Indication:**
507
+ ```
508
+ Network Activity:
509
+ ┌────────────────────────────────────────────────────┐
510
+ │ GET /api/user/123 200 12ms 🎭 MOCKED │
511
+ └────────────────────────────────────────────────────┘
512
+ ```
513
+
514
+ ## Integration with Other Logs
515
+
516
+ Correlate network with other events:
517
+
518
+ ```
519
+ Timeline View (0:15 - 0:30):
520
+ ┌────────────────────────────────────────────────────┐
521
+ │ [0:15] 🔵 Application: Click login button │
522
+ │ [0:16] 🌐 Network: POST /api/login (started) │
523
+ │ [0:17] 📝 Browser: console.log('Logging in...') │
524
+ │ [0:18] 🌐 Network: POST /api/login (200 OK, 156ms) │
525
+ │ [0:19] 📝 Browser: console.log('Login successful') │
526
+ │ [0:20] 🔵 Application: Navigate to /dashboard │
527
+ │ [0:21] 🌐 Network: GET /api/dashboard/data │
528
+ │ [0:25] ⚠️ Browser: console.warn('Slow API') │
529
+ │ [0:28] 🌐 Network: GET /api/dashboard (200, 445ms) │
530
+ │ [0:30] 🔵 Application: Dashboard rendered │
531
+ └────────────────────────────────────────────────────┘
532
+ ```
533
+
534
+ ## Learn More
535
+
536
+ <CardGroup cols={2}>
537
+ <Card
538
+ title="Application Logs"
539
+ icon="terminal"
540
+ href="/v7/features/application-logs"
541
+ >
542
+ TestDriver SDK logs
543
+ </Card>
544
+
545
+ <Card
546
+ title="Browser Logs"
547
+ icon="browser"
548
+ href="/v7/features/browser-logs"
549
+ >
550
+ Console output and errors
551
+ </Card>
552
+
553
+ <Card
554
+ title="System Performance"
555
+ icon="chart-line"
556
+ href="/v7/features/system-performance"
557
+ >
558
+ CPU, memory, and resource usage
559
+ </Card>
560
+
561
+ <Card
562
+ title="Test Replays"
563
+ icon="video"
564
+ href="/v7/features/test-replays"
565
+ >
566
+ Complete test execution videos
567
+ </Card>
568
+ </CardGroup>
@@ -1,34 +1,15 @@
1
1
  ---
2
- title: "Observable & Debuggable"
2
+ title: "Dashcam Replays"
3
3
  description: "Complete visibility into test execution with replays, logs, and analytics"
4
- icon: "microscope"
4
+ icon: "video"
5
5
  ---
6
6
 
7
- Debugging test failures is effortless with TestDriver's comprehensive observability features - video replays, detailed logs, network monitoring, and performance metrics.
7
+ Debugging test failures is effortless with TestDriver's comprehensive test replay features - video replays, detailed logs, network monitoring, and performance metrics.
8
8
 
9
9
  ## Video Replays with Dashcam
10
10
 
11
11
  Every test automatically records a video replay for easy debugging:
12
12
 
13
- ```javascript
14
- import { test } from 'vitest';
15
- import { chrome } from 'testdriverai/presets';
16
-
17
- test('with automatic replay', async (context) => {
18
- const { testdriver, dashcam } = await chrome(context, {
19
- url: 'https://example.com'
20
- });
21
-
22
- await testdriver.find('button').click();
23
- await testdriver.find('input').type('test data');
24
- await testdriver.find('submit').click();
25
-
26
- // After test completes, view replay
27
- console.log('Watch replay:', dashcam.url);
28
- // Output: https://console.testdriver.ai/dashcam/abc123def456
29
- });
30
- ```
31
-
32
13
  <Card title="Dashcam Features" icon="video">
33
14
  **Every replay includes:**
34
15