testdriverai 7.9.39-test → 7.9.41-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/agent/index.js +78 -54
- package/agent/lib/sandbox.js +17 -3
- package/agent/lib/sdk.js +15 -8
- package/agent/lib/system.js +1 -1
- package/docs/_data/examples-manifest.json +42 -42
- package/docs/v7/examples/ai.mdx +1 -1
- package/docs/v7/examples/assert.mdx +1 -1
- package/docs/v7/examples/chrome-extension.mdx +1 -1
- package/docs/v7/examples/element-not-found.mdx +1 -1
- package/docs/v7/examples/exec-output.mdx +1 -1
- package/docs/v7/examples/exec-pwsh.mdx +1 -1
- package/docs/v7/examples/findall-coffee-icons.mdx +1 -1
- package/docs/v7/examples/focus-window.mdx +1 -1
- package/docs/v7/examples/hover-image.mdx +1 -1
- package/docs/v7/examples/hover-text-with-description.mdx +1 -1
- package/docs/v7/examples/hover-text.mdx +1 -1
- package/docs/v7/examples/installer.mdx +1 -1
- package/docs/v7/examples/launch-vscode-linux.mdx +1 -1
- package/docs/v7/examples/parse.mdx +1 -1
- package/docs/v7/examples/press-keys.mdx +1 -1
- package/docs/v7/examples/prompt.mdx +1 -1
- package/docs/v7/examples/scroll-keyboard.mdx +1 -1
- package/docs/v7/examples/scroll-until-image.mdx +1 -1
- package/docs/v7/examples/scroll.mdx +1 -1
- package/docs/v7/examples/type.mdx +1 -1
- package/docs/v7/examples/windows-installer.mdx +1 -1
- package/lib/sentry.js +13 -0
- package/package.json +1 -1
package/agent/index.js
CHANGED
|
@@ -494,65 +494,89 @@ class TestDriverAgent extends EventEmitter2 {
|
|
|
494
494
|
);
|
|
495
495
|
}
|
|
496
496
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
497
|
+
const sentry = require("../lib/sentry");
|
|
498
|
+
return sentry.withSpan(
|
|
499
|
+
{
|
|
500
|
+
name: `command.${commandName}`,
|
|
501
|
+
op: "command",
|
|
502
|
+
attributes: { "command.name": commandName, "command.depth": depth },
|
|
503
|
+
},
|
|
504
|
+
async (span) => {
|
|
505
|
+
try {
|
|
506
|
+
let response;
|
|
507
|
+
|
|
508
|
+
// "run" and "if" commands are special meta commands
|
|
509
|
+
// that change the flow of execution
|
|
510
|
+
if (command.command == "run") {
|
|
511
|
+
response = await this.embed(command.file, depth, pushToHistory);
|
|
512
|
+
} else if (command.command == "if") {
|
|
513
|
+
response = await this.iffy(
|
|
514
|
+
command.condition,
|
|
515
|
+
command.then,
|
|
516
|
+
command.else,
|
|
517
|
+
depth,
|
|
518
|
+
);
|
|
519
|
+
} else {
|
|
520
|
+
response = await this.commander.run(command, depth);
|
|
521
|
+
}
|
|
514
522
|
|
|
515
|
-
|
|
516
|
-
|
|
523
|
+
const endTime = Date.now();
|
|
524
|
+
const duration = endTime - startTime;
|
|
517
525
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
depth,
|
|
522
|
-
data: command,
|
|
523
|
-
duration,
|
|
524
|
-
response,
|
|
525
|
-
timestamp: endTime,
|
|
526
|
-
sourcePosition: sourcePosition,
|
|
527
|
-
});
|
|
526
|
+
if (span) {
|
|
527
|
+
span.setStatus({ code: 1 }); // OK
|
|
528
|
+
}
|
|
528
529
|
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
530
|
+
// Emit command success event with source mapping
|
|
531
|
+
this.emitter.emit(events.command.success, {
|
|
532
|
+
command: commandName,
|
|
533
|
+
depth,
|
|
534
|
+
data: command,
|
|
535
|
+
duration,
|
|
536
|
+
response,
|
|
537
|
+
timestamp: endTime,
|
|
538
|
+
sourcePosition: sourcePosition,
|
|
539
|
+
});
|
|
536
540
|
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
541
|
+
// if the result of a command contains more commands, we perform the process again
|
|
542
|
+
if (response && typeof response === "string") {
|
|
543
|
+
return await this.actOnMarkdown(
|
|
544
|
+
response,
|
|
545
|
+
depth,
|
|
546
|
+
false,
|
|
547
|
+
false,
|
|
548
|
+
false,
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
} catch (error) {
|
|
552
|
+
const endTime = Date.now();
|
|
553
|
+
const duration = endTime - startTime;
|
|
547
554
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
555
|
+
if (span) {
|
|
556
|
+
span.setStatus({ code: 2, message: error.message });
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
// Emit command error event with source mapping
|
|
560
|
+
this.emitter.emit(events.command.error, {
|
|
561
|
+
command: commandName,
|
|
562
|
+
depth,
|
|
563
|
+
data: command,
|
|
564
|
+
error: error.message,
|
|
565
|
+
duration,
|
|
566
|
+
timestamp: endTime,
|
|
567
|
+
sourcePosition: sourcePosition,
|
|
568
|
+
});
|
|
569
|
+
|
|
570
|
+
return await this.haveAIResolveError(
|
|
571
|
+
error,
|
|
572
|
+
yaml.dump({ commands: [yml] }),
|
|
573
|
+
depth,
|
|
574
|
+
true,
|
|
575
|
+
shouldSave,
|
|
576
|
+
);
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
);
|
|
556
580
|
}
|
|
557
581
|
|
|
558
582
|
async executeCommands(
|
package/agent/lib/sandbox.js
CHANGED
|
@@ -1230,9 +1230,11 @@ const createSandbox = function (emitter, analytics, sessionInstance) {
|
|
|
1230
1230
|
startTime: Date.now(),
|
|
1231
1231
|
};
|
|
1232
1232
|
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1233
|
+
// Prevent unhandled rejections from late Ably responses that arrive
|
|
1234
|
+
// after the caller has moved on (e.g. test retry, cleanup). The await
|
|
1235
|
+
// chain still receives the rejection; this just marks the promise as
|
|
1236
|
+
// "handled" so Node does not emit unhandledRejection.
|
|
1237
|
+
p.catch(function () { });
|
|
1236
1238
|
|
|
1237
1239
|
this._throttledPublish(this._sessionChannel, "command", message)
|
|
1238
1240
|
.then(function () {
|
|
@@ -1467,6 +1469,18 @@ const createSandbox = function (emitter, analytics, sessionInstance) {
|
|
|
1467
1469
|
this.authenticated = false;
|
|
1468
1470
|
this.instance = null;
|
|
1469
1471
|
this._lastConnectParams = null;
|
|
1472
|
+
|
|
1473
|
+
// Reject all pending promises so active callers get a clear error
|
|
1474
|
+
// instead of hanging forever. The safety .catch() in _sendAbly()
|
|
1475
|
+
// ensures these rejections never surface as unhandled.
|
|
1476
|
+
var pendingIds = Object.keys(this.ps);
|
|
1477
|
+
var closedError = new Error('Sandbox connection closed');
|
|
1478
|
+
for (var i = 0; i < pendingIds.length; i++) {
|
|
1479
|
+
var entry = this.ps[pendingIds[i]];
|
|
1480
|
+
if (entry && typeof entry.reject === 'function') {
|
|
1481
|
+
try { entry.reject(closedError); } catch (_) { /* already settled */ }
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1470
1484
|
this.ps = {};
|
|
1471
1485
|
}
|
|
1472
1486
|
|
package/agent/lib/sdk.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const { events } = require("../events");
|
|
2
2
|
const { getSentryTraceHeaders } = require("./http");
|
|
3
|
+
const sentry = require("../../lib/sentry");
|
|
3
4
|
|
|
4
5
|
// get the version from package.json
|
|
5
6
|
const { version } = require("../../package.json");
|
|
@@ -20,6 +21,7 @@ const DEFAULT_RETRY_CONFIG = {
|
|
|
20
21
|
'ENOTFOUND',
|
|
21
22
|
'ENETUNREACH',
|
|
22
23
|
'ERR_NETWORK',
|
|
24
|
+
'ERR_BAD_RESPONSE',
|
|
23
25
|
'ECONNABORTED',
|
|
24
26
|
'EPIPE',
|
|
25
27
|
'EAI_AGAIN',
|
|
@@ -35,14 +37,7 @@ const DEFAULT_RETRY_CONFIG = {
|
|
|
35
37
|
* @returns {boolean} Whether the request should be retried
|
|
36
38
|
*/
|
|
37
39
|
function isRetryableError(error, config = DEFAULT_RETRY_CONFIG) {
|
|
38
|
-
|
|
39
|
-
if (!error.response) {
|
|
40
|
-
return config.retryableNetworkCodes.includes(error.code);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// HTTP status code based retries
|
|
44
|
-
const status = error.response?.status;
|
|
45
|
-
return config.retryableStatusCodes.includes(status);
|
|
40
|
+
return true;
|
|
46
41
|
}
|
|
47
42
|
|
|
48
43
|
/**
|
|
@@ -102,6 +97,18 @@ async function withRetry(fn, options = {}) {
|
|
|
102
97
|
|
|
103
98
|
const delayMs = calculateRetryDelay(attempt, error, config);
|
|
104
99
|
|
|
100
|
+
// Log retry errors to Sentry for visibility
|
|
101
|
+
sentry.captureException(error, {
|
|
102
|
+
tags: { phase: 'retry', attempt: attempt + 1 },
|
|
103
|
+
extra: {
|
|
104
|
+
maxRetries: config.maxRetries,
|
|
105
|
+
delayMs,
|
|
106
|
+
code: error.code,
|
|
107
|
+
status: error.response?.status,
|
|
108
|
+
url: error.config?.url?.replace(/X-Amz-\w+=[\w%]+/g, 'X-Amz-***=REDACTED'),
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
|
|
105
112
|
// Call onRetry callback if provided
|
|
106
113
|
if (options.onRetry) {
|
|
107
114
|
options.onRetry(attempt + 1, error, delayMs);
|
package/agent/lib/system.js
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
"$schema": "./examples-manifest.schema.json",
|
|
3
3
|
"examples": {
|
|
4
4
|
"assert.test.mjs": {
|
|
5
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
6
|
-
"lastUpdated": "2026-04-
|
|
5
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84576d5b12767ca15e3d2",
|
|
6
|
+
"lastUpdated": "2026-04-10T00:51:33.963Z"
|
|
7
7
|
},
|
|
8
8
|
"drag-and-drop.test.mjs": {
|
|
9
9
|
"url": "https://console.testdriver.ai/runs/69a62b3aaa712ecd3dea730a/69a62b42fc0ac3cc632a918b",
|
|
10
10
|
"lastUpdated": "2026-03-03T00:32:25.275Z"
|
|
11
11
|
},
|
|
12
12
|
"exec-pwsh.test.mjs": {
|
|
13
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
14
|
-
"lastUpdated": "2026-04-
|
|
13
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84560d5b12767ca15e3c6",
|
|
14
|
+
"lastUpdated": "2026-04-10T00:35:14.640Z"
|
|
15
15
|
},
|
|
16
16
|
"match-image.test.mjs": {
|
|
17
17
|
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8738c14b73310c783941d",
|
|
@@ -22,84 +22,84 @@
|
|
|
22
22
|
"lastUpdated": "2026-03-03T00:32:25.282Z"
|
|
23
23
|
},
|
|
24
24
|
"hover-text-with-description.test.mjs": {
|
|
25
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
26
|
-
"lastUpdated": "2026-04-
|
|
25
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84563d5b12767ca15e3c7",
|
|
26
|
+
"lastUpdated": "2026-04-10T00:33:38.923Z"
|
|
27
27
|
},
|
|
28
28
|
"windows-installer.test.mjs": {
|
|
29
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
30
|
-
"lastUpdated": "2026-04-
|
|
29
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84568d5b12767ca15e3ca",
|
|
30
|
+
"lastUpdated": "2026-04-10T00:35:21.576Z"
|
|
31
31
|
},
|
|
32
32
|
"exec-output.test.mjs": {
|
|
33
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
34
|
-
"lastUpdated": "2026-04-
|
|
33
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8456ad5b12767ca15e3cb",
|
|
34
|
+
"lastUpdated": "2026-04-10T00:35:23.589Z"
|
|
35
35
|
},
|
|
36
36
|
"chrome-extension.test.mjs": {
|
|
37
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
38
|
-
"lastUpdated": "2026-04-
|
|
37
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8455ed5b12767ca15e3c5",
|
|
38
|
+
"lastUpdated": "2026-04-10T00:34:24.409Z"
|
|
39
39
|
},
|
|
40
40
|
"launch-vscode-linux.test.mjs": {
|
|
41
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
42
|
-
"lastUpdated": "2026-04-
|
|
41
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84565d5b12767ca15e3c8",
|
|
42
|
+
"lastUpdated": "2026-04-10T00:41:22.597Z"
|
|
43
43
|
},
|
|
44
44
|
"hover-image.test.mjs": {
|
|
45
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
46
|
-
"lastUpdated": "2026-04-
|
|
45
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8456cd5b12767ca15e3cc",
|
|
46
|
+
"lastUpdated": "2026-04-10T00:34:37.536Z"
|
|
47
47
|
},
|
|
48
48
|
"installer.test.mjs": {
|
|
49
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
50
|
-
"lastUpdated": "2026-04-
|
|
49
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8456fd5b12767ca15e3cd",
|
|
50
|
+
"lastUpdated": "2026-04-10T00:33:50.808Z"
|
|
51
51
|
},
|
|
52
52
|
"type.test.mjs": {
|
|
53
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
54
|
-
"lastUpdated": "2026-04-
|
|
53
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84572d5b12767ca15e3d0",
|
|
54
|
+
"lastUpdated": "2026-04-10T00:34:42.548Z"
|
|
55
55
|
},
|
|
56
56
|
"press-keys.test.mjs": {
|
|
57
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
58
|
-
"lastUpdated": "2026-04-
|
|
57
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84574d5b12767ca15e3d1",
|
|
58
|
+
"lastUpdated": "2026-04-10T00:50:25.456Z"
|
|
59
59
|
},
|
|
60
60
|
"scroll-keyboard.test.mjs": {
|
|
61
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
62
|
-
"lastUpdated": "2026-04-
|
|
61
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8457bd5b12767ca15e3d4",
|
|
62
|
+
"lastUpdated": "2026-04-10T00:35:39.270Z"
|
|
63
63
|
},
|
|
64
64
|
"scroll.test.mjs": {
|
|
65
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
66
|
-
"lastUpdated": "2026-04-
|
|
65
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84584d5b12767ca15e3d8",
|
|
66
|
+
"lastUpdated": "2026-04-10T00:56:48.320Z"
|
|
67
67
|
},
|
|
68
68
|
"scroll-until-image.test.mjs": {
|
|
69
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
70
|
-
"lastUpdated": "2026-04-
|
|
69
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8457dd5b12767ca15e3d5",
|
|
70
|
+
"lastUpdated": "2026-04-10T00:34:06.264Z"
|
|
71
71
|
},
|
|
72
72
|
"prompt.test.mjs": {
|
|
73
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
74
|
-
"lastUpdated": "2026-04-
|
|
73
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84580d5b12767ca15e3d6",
|
|
74
|
+
"lastUpdated": "2026-04-10T00:35:44.027Z"
|
|
75
75
|
},
|
|
76
76
|
"focus-window.test.mjs": {
|
|
77
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
78
|
-
"lastUpdated": "2026-04-
|
|
77
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84582d5b12767ca15e3d7",
|
|
78
|
+
"lastUpdated": "2026-04-10T00:34:10.512Z"
|
|
79
79
|
},
|
|
80
80
|
"captcha-api.test.mjs": {
|
|
81
81
|
"url": "https://console.testdriver.ai/runs/698f7df69e27ce1528d7d087/698f7fb0d3b320ad547d9d44",
|
|
82
82
|
"lastUpdated": "2026-02-13T19:55:05.951Z"
|
|
83
83
|
},
|
|
84
84
|
"element-not-found.test.mjs": {
|
|
85
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
86
|
-
"lastUpdated": "2026-04-
|
|
85
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84587d5b12767ca15e3d9",
|
|
86
|
+
"lastUpdated": "2026-04-10T00:35:49.919Z"
|
|
87
87
|
},
|
|
88
88
|
"formatted-logging.test.mjs": {
|
|
89
89
|
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c873a714b73310c7839450",
|
|
90
90
|
"lastUpdated": "2026-03-29T00:36:10.628Z"
|
|
91
91
|
},
|
|
92
92
|
"hover-text.test.mjs": {
|
|
93
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
94
|
-
"lastUpdated": "2026-04-
|
|
93
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8458bd5b12767ca15e3db",
|
|
94
|
+
"lastUpdated": "2026-04-10T00:34:19.364Z"
|
|
95
95
|
},
|
|
96
96
|
"no-provision.test.mjs": {
|
|
97
97
|
"url": "https://console.testdriver.ai/runs/69a62b3aaa712ecd3dea730a/69a62b7706a177a05bccd1cf",
|
|
98
98
|
"lastUpdated": "2026-03-03T00:32:25.279Z"
|
|
99
99
|
},
|
|
100
100
|
"ai.test.mjs": {
|
|
101
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
102
|
-
"lastUpdated": "2026-04-
|
|
101
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84589d5b12767ca15e3da",
|
|
102
|
+
"lastUpdated": "2026-04-10T01:00:48.870Z"
|
|
103
103
|
},
|
|
104
104
|
"popup-loading.test.mjs": {
|
|
105
105
|
"url": "https://console.testdriver.ai/runs/698bc89f7140c3fa7daaca8d/698bca7f7140c3fa7daacbf7",
|
|
@@ -134,12 +134,12 @@
|
|
|
134
134
|
"lastUpdated": "2026-02-13T19:55:05.953Z"
|
|
135
135
|
},
|
|
136
136
|
"findall-coffee-icons.test.mjs": {
|
|
137
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
138
|
-
"lastUpdated": "2026-04-
|
|
137
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84579d5b12767ca15e3d3",
|
|
138
|
+
"lastUpdated": "2026-04-10T00:34:49.549Z"
|
|
139
139
|
},
|
|
140
140
|
"parse.test.mjs": {
|
|
141
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
142
|
-
"lastUpdated": "2026-04-
|
|
141
|
+
"url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8458ed5b12767ca15e3dc",
|
|
142
|
+
"lastUpdated": "2026-04-10T00:35:56.788Z"
|
|
143
143
|
},
|
|
144
144
|
"flake-diffthreshold-001.test.mjs": {
|
|
145
145
|
"url": "https://console.testdriver.ai/runs/69a62b3aaa712ecd3dea730a/69a62bcafc0ac3cc632a91aa",
|
package/docs/v7/examples/ai.mdx
CHANGED
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* ai.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84589d5b12767ca15e3da/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* assert.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84576d5b12767ca15e3d2/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* chrome-extension.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8455ed5b12767ca15e3c5/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* element-not-found.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84587d5b12767ca15e3d9/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* exec-output.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8456ad5b12767ca15e3cb/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* exec-pwsh.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84560d5b12767ca15e3c6/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -18,7 +18,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
18
18
|
|
|
19
19
|
{/* findall-coffee-icons.test.mjs output */}
|
|
20
20
|
<iframe
|
|
21
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
21
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84579d5b12767ca15e3d3/replay"
|
|
22
22
|
width="100%"
|
|
23
23
|
height="600"
|
|
24
24
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* focus-window.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84582d5b12767ca15e3d7/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* hover-image.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8456cd5b12767ca15e3cc/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -18,7 +18,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
18
18
|
|
|
19
19
|
{/* hover-text-with-description.test.mjs output */}
|
|
20
20
|
<iframe
|
|
21
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
21
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84563d5b12767ca15e3c7/replay"
|
|
22
22
|
width="100%"
|
|
23
23
|
height="600"
|
|
24
24
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* hover-text.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8458bd5b12767ca15e3db/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* installer.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8456fd5b12767ca15e3cd/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* launch-vscode-linux.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84565d5b12767ca15e3c8/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -17,7 +17,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
17
17
|
|
|
18
18
|
{/* parse.test.mjs output */}
|
|
19
19
|
<iframe
|
|
20
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
20
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8458ed5b12767ca15e3dc/replay"
|
|
21
21
|
width="100%"
|
|
22
22
|
height="600"
|
|
23
23
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* press-keys.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84574d5b12767ca15e3d1/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -17,7 +17,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
17
17
|
|
|
18
18
|
{/* prompt.test.mjs output */}
|
|
19
19
|
<iframe
|
|
20
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
20
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84580d5b12767ca15e3d6/replay"
|
|
21
21
|
width="100%"
|
|
22
22
|
height="600"
|
|
23
23
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* scroll-keyboard.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8457bd5b12767ca15e3d4/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* scroll-until-image.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8457dd5b12767ca15e3d5/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* scroll.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84584d5b12767ca15e3d8/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* type.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84572d5b12767ca15e3d0/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* windows-installer.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84568d5b12767ca15e3ca/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
package/lib/sentry.js
CHANGED
|
@@ -414,6 +414,18 @@ function startTransaction(name, op = "cli") {
|
|
|
414
414
|
return Sentry.startSpan({ name, op });
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
+
/**
|
|
418
|
+
* Execute a callback within a Sentry performance span.
|
|
419
|
+
* If Sentry is not enabled, the callback is executed directly.
|
|
420
|
+
* @param {Object} options - Span options ({ name, op, attributes })
|
|
421
|
+
* @param {Function} callback - Async callback receiving the span
|
|
422
|
+
* @returns {Promise<*>} Result of the callback
|
|
423
|
+
*/
|
|
424
|
+
async function withSpan(options, callback) {
|
|
425
|
+
if (!isEnabled()) return callback(null);
|
|
426
|
+
return Sentry.startSpan(options, callback);
|
|
427
|
+
}
|
|
428
|
+
|
|
417
429
|
/**
|
|
418
430
|
* Flush pending events before process exit
|
|
419
431
|
* @param {number} timeout - Timeout in milliseconds
|
|
@@ -436,5 +448,6 @@ module.exports = {
|
|
|
436
448
|
getTraceId,
|
|
437
449
|
attachLogListeners,
|
|
438
450
|
startTransaction,
|
|
451
|
+
withSpan,
|
|
439
452
|
flush,
|
|
440
453
|
};
|