@testdriverai/mcp 7.9.99-canary → 7.9.100-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/docs/_data/examples-manifest.json +52 -52
- 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/findall-coffee-icons.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/scroll-keyboard.mdx +1 -1
- package/docs/v7/examples/scroll.mdx +1 -1
- package/docs/v7/examples/type.mdx +1 -1
- package/interfaces/vitest-plugin.mjs +36 -53
- package/lib/vitest/hooks.mjs +33 -34
- package/package.json +1 -1
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
"$schema": "./examples-manifest.schema.json",
|
|
3
3
|
"examples": {
|
|
4
4
|
"assert.test.mjs": {
|
|
5
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
6
|
-
"replayUrl": "https://console-test.testdriver.ai/replay/
|
|
7
|
-
"embedUrl": "https://console-test.testdriver.ai/replay/
|
|
8
|
-
"lastUpdated": "2026-06-
|
|
5
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b70433fd2305b2086568",
|
|
6
|
+
"replayUrl": "https://console-test.testdriver.ai/replay/6a28bf846a47e2b055c07db8?share=XBQlXri7mRy4piyJO8CxQ",
|
|
7
|
+
"embedUrl": "https://console-test.testdriver.ai/replay/6a28bf846a47e2b055c07db8?share=XBQlXri7mRy4piyJO8CxQ&embed=true",
|
|
8
|
+
"lastUpdated": "2026-06-10T01:36:11.369Z"
|
|
9
9
|
},
|
|
10
10
|
"drag-and-drop.test.mjs": {
|
|
11
11
|
"url": "https://console.testdriver.ai/runs/69a62b3aaa712ecd3dea730a/69a62b42fc0ac3cc632a918b",
|
|
12
12
|
"lastUpdated": "2026-03-03T00:32:25.275Z"
|
|
13
13
|
},
|
|
14
14
|
"exec-pwsh.test.mjs": {
|
|
15
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
16
|
-
"lastUpdated": "2026-06-
|
|
15
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b62333fd2305b2086532",
|
|
16
|
+
"lastUpdated": "2026-06-10T01:09:58.392Z"
|
|
17
17
|
},
|
|
18
18
|
"match-image.test.mjs": {
|
|
19
19
|
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8738c14b73310c783941d",
|
|
@@ -24,92 +24,92 @@
|
|
|
24
24
|
"lastUpdated": "2026-03-03T00:32:25.282Z"
|
|
25
25
|
},
|
|
26
26
|
"hover-text-with-description.test.mjs": {
|
|
27
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
28
|
-
"lastUpdated": "2026-06-
|
|
27
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b63933fd2305b2086547",
|
|
28
|
+
"lastUpdated": "2026-06-10T00:56:25.378Z"
|
|
29
29
|
},
|
|
30
30
|
"windows-installer.test.mjs": {
|
|
31
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
32
|
-
"lastUpdated": "2026-06-
|
|
31
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b66733fd2305b2086552",
|
|
32
|
+
"lastUpdated": "2026-06-10T01:11:10.069Z"
|
|
33
33
|
},
|
|
34
34
|
"exec-output.test.mjs": {
|
|
35
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
36
|
-
"lastUpdated": "2026-06-
|
|
35
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b66833fd2305b2086553",
|
|
36
|
+
"lastUpdated": "2026-06-10T01:11:11.538Z"
|
|
37
37
|
},
|
|
38
38
|
"chrome-extension.test.mjs": {
|
|
39
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
40
|
-
"lastUpdated": "2026-06-
|
|
39
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b62133fd2305b208652e",
|
|
40
|
+
"lastUpdated": "2026-06-10T01:02:57.566Z"
|
|
41
41
|
},
|
|
42
42
|
"launch-vscode-linux.test.mjs": {
|
|
43
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
44
|
-
"replayUrl": "https://console-test.testdriver.ai/replay/
|
|
45
|
-
"embedUrl": "https://console-test.testdriver.ai/replay/
|
|
46
|
-
"lastUpdated": "2026-06-
|
|
43
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b65b33fd2305b208654d",
|
|
44
|
+
"replayUrl": "https://console-test.testdriver.ai/replay/6a28bcb2bcedbf8d47aecdc9?share=zSVMEXnravc8pXK1WrC1g",
|
|
45
|
+
"embedUrl": "https://console-test.testdriver.ai/replay/6a28bcb2bcedbf8d47aecdc9?share=zSVMEXnravc8pXK1WrC1g&embed=true",
|
|
46
|
+
"lastUpdated": "2026-06-10T01:24:08.968Z"
|
|
47
47
|
},
|
|
48
48
|
"hover-image.test.mjs": {
|
|
49
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
50
|
-
"lastUpdated": "2026-06-
|
|
49
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b67e33fd2305b2086558",
|
|
50
|
+
"lastUpdated": "2026-06-10T01:04:34.886Z"
|
|
51
51
|
},
|
|
52
52
|
"installer.test.mjs": {
|
|
53
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
54
|
-
"lastUpdated": "2026-06-
|
|
53
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b69533fd2305b2086559",
|
|
54
|
+
"lastUpdated": "2026-06-10T00:57:57.327Z"
|
|
55
55
|
},
|
|
56
56
|
"type.test.mjs": {
|
|
57
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
58
|
-
"lastUpdated": "2026-06-
|
|
57
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b6d733fd2305b2086563",
|
|
58
|
+
"lastUpdated": "2026-06-10T01:06:01.928Z"
|
|
59
59
|
},
|
|
60
60
|
"press-keys.test.mjs": {
|
|
61
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
62
|
-
"replayUrl": "https://console-test.testdriver.ai/replay/
|
|
63
|
-
"embedUrl": "https://console-test.testdriver.ai/replay/
|
|
64
|
-
"lastUpdated": "2026-06-
|
|
61
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b6ed33fd2305b2086567",
|
|
62
|
+
"replayUrl": "https://console-test.testdriver.ai/replay/6a28bf256a47e2b055c07db6?share=xBUKWDfqQFEXNYcJDQ",
|
|
63
|
+
"embedUrl": "https://console-test.testdriver.ai/replay/6a28bf256a47e2b055c07db6?share=xBUKWDfqQFEXNYcJDQ&embed=true",
|
|
64
|
+
"lastUpdated": "2026-06-10T01:34:36.293Z"
|
|
65
65
|
},
|
|
66
66
|
"scroll-keyboard.test.mjs": {
|
|
67
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
68
|
-
"lastUpdated": "2026-06-
|
|
67
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b73233fd2305b208656a",
|
|
68
|
+
"lastUpdated": "2026-06-10T01:14:32.926Z"
|
|
69
69
|
},
|
|
70
70
|
"scroll.test.mjs": {
|
|
71
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
72
|
-
"replayUrl": "https://console-test.testdriver.ai/replay/
|
|
73
|
-
"embedUrl": "https://console-test.testdriver.ai/replay/
|
|
74
|
-
"lastUpdated": "2026-06-
|
|
71
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b74c33fd2305b208656e",
|
|
72
|
+
"replayUrl": "https://console-test.testdriver.ai/replay/6a28c1a68ad160db245e71a8?share=kAIVPuNJqk4uHxgiHWuGA",
|
|
73
|
+
"embedUrl": "https://console-test.testdriver.ai/replay/6a28c1a68ad160db245e71a8?share=kAIVPuNJqk4uHxgiHWuGA&embed=true",
|
|
74
|
+
"lastUpdated": "2026-06-10T01:45:16.222Z"
|
|
75
75
|
},
|
|
76
76
|
"scroll-until-image.test.mjs": {
|
|
77
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
78
|
-
"lastUpdated": "2026-06-
|
|
77
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b73333fd2305b208656b",
|
|
78
|
+
"lastUpdated": "2026-06-10T01:00:35.934Z"
|
|
79
79
|
},
|
|
80
80
|
"prompt.test.mjs": {
|
|
81
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
82
|
-
"lastUpdated": "2026-06-
|
|
81
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b73533fd2305b208656c",
|
|
82
|
+
"lastUpdated": "2026-06-10T01:14:36.150Z"
|
|
83
83
|
},
|
|
84
84
|
"focus-window.test.mjs": {
|
|
85
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
86
|
-
"lastUpdated": "2026-06-
|
|
85
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b73633fd2305b208656d",
|
|
86
|
+
"lastUpdated": "2026-06-10T01:00:38.872Z"
|
|
87
87
|
},
|
|
88
88
|
"captcha-api.test.mjs": {
|
|
89
89
|
"url": "https://console.testdriver.ai/runs/698f7df69e27ce1528d7d087/698f7fb0d3b320ad547d9d44",
|
|
90
90
|
"lastUpdated": "2026-02-13T19:55:05.951Z"
|
|
91
91
|
},
|
|
92
92
|
"element-not-found.test.mjs": {
|
|
93
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
94
|
-
"lastUpdated": "2026-06-
|
|
93
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b76533fd2305b208656f",
|
|
94
|
+
"lastUpdated": "2026-06-10T01:15:23.976Z"
|
|
95
95
|
},
|
|
96
96
|
"formatted-logging.test.mjs": {
|
|
97
97
|
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c873a714b73310c7839450",
|
|
98
98
|
"lastUpdated": "2026-03-29T00:36:10.628Z"
|
|
99
99
|
},
|
|
100
100
|
"hover-text.test.mjs": {
|
|
101
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
102
|
-
"lastUpdated": "2026-06-
|
|
101
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b79433fd2305b2086571",
|
|
102
|
+
"lastUpdated": "2026-06-10T01:02:12.382Z"
|
|
103
103
|
},
|
|
104
104
|
"no-provision.test.mjs": {
|
|
105
105
|
"url": "https://console.testdriver.ai/runs/69a62b3aaa712ecd3dea730a/69a62b7706a177a05bccd1cf",
|
|
106
106
|
"lastUpdated": "2026-03-03T00:32:25.279Z"
|
|
107
107
|
},
|
|
108
108
|
"ai.test.mjs": {
|
|
109
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
110
|
-
"replayUrl": "https://console-test.testdriver.ai/replay/
|
|
111
|
-
"embedUrl": "https://console-test.testdriver.ai/replay/
|
|
112
|
-
"lastUpdated": "2026-06-
|
|
109
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b77d33fd2305b2086570",
|
|
110
|
+
"replayUrl": "https://console-test.testdriver.ai/replay/6a28c2a58ad160db245e71ac?share=iqNkucmdau8iCsfxCm8oQA",
|
|
111
|
+
"embedUrl": "https://console-test.testdriver.ai/replay/6a28c2a58ad160db245e71ac?share=iqNkucmdau8iCsfxCm8oQA&embed=true",
|
|
112
|
+
"lastUpdated": "2026-06-10T01:49:31.839Z"
|
|
113
113
|
},
|
|
114
114
|
"popup-loading.test.mjs": {
|
|
115
115
|
"url": "https://console.testdriver.ai/runs/698bc89f7140c3fa7daaca8d/698bca7f7140c3fa7daacbf7",
|
|
@@ -144,12 +144,12 @@
|
|
|
144
144
|
"lastUpdated": "2026-02-13T19:55:05.953Z"
|
|
145
145
|
},
|
|
146
146
|
"findall-coffee-icons.test.mjs": {
|
|
147
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
148
|
-
"lastUpdated": "2026-06-
|
|
147
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b71b33fd2305b2086569",
|
|
148
|
+
"lastUpdated": "2026-06-10T01:07:10.579Z"
|
|
149
149
|
},
|
|
150
150
|
"parse.test.mjs": {
|
|
151
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
152
|
-
"lastUpdated": "2026-06-
|
|
151
|
+
"url": "https://console-test.testdriver.ai/runs/6a28b60b33fd2305b2086513/6a28b7ab33fd2305b2086572",
|
|
152
|
+
"lastUpdated": "2026-06-10T01:16:34.203Z"
|
|
153
153
|
},
|
|
154
154
|
"flake-diffthreshold-001.test.mjs": {
|
|
155
155
|
"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://console-test.testdriver.ai/replay/
|
|
15
|
+
src="https://console-test.testdriver.ai/replay/6a28c2a58ad160db245e71ac?share=iqNkucmdau8iCsfxCm8oQA&embed=true"
|
|
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://console-test.testdriver.ai/replay/
|
|
15
|
+
src="https://console-test.testdriver.ai/replay/6a28bf846a47e2b055c07db8?share=XBQlXri7mRy4piyJO8CxQ&embed=true"
|
|
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/6a28b62133fd2305b208652e/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/6a28b76533fd2305b208656f/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/6a28b71b33fd2305b2086569/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-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/6a28b67e33fd2305b2086558/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/6a28b63933fd2305b2086547/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/6a28b79433fd2305b2086571/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/6a28b69533fd2305b2086559/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://console-test.testdriver.ai/replay/
|
|
15
|
+
src="https://console-test.testdriver.ai/replay/6a28bcb2bcedbf8d47aecdc9?share=zSVMEXnravc8pXK1WrC1g&embed=true"
|
|
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
|
{/* parse.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/6a28b7ab33fd2305b2086572/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
|
{/* press-keys.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://console-test.testdriver.ai/replay/
|
|
15
|
+
src="https://console-test.testdriver.ai/replay/6a28bf256a47e2b055c07db6?share=xBUKWDfqQFEXNYcJDQ&embed=true"
|
|
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-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/6a28b73233fd2305b208656a/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://console-test.testdriver.ai/replay/
|
|
15
|
+
src="https://console-test.testdriver.ai/replay/6a28c1a68ad160db245e71a8?share=kAIVPuNJqk4uHxgiHWuGA&embed=true"
|
|
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/6a28b6d733fd2305b2086563/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -821,10 +821,6 @@ class TestDriverReporter {
|
|
|
821
821
|
// Initialize Sentry for error reporting
|
|
822
822
|
initializeSentry();
|
|
823
823
|
|
|
824
|
-
// Store project root for making file paths relative
|
|
825
|
-
pluginState.projectRoot = ctx.config.root || process.cwd();
|
|
826
|
-
logger.debug("Project root:", pluginState.projectRoot);
|
|
827
|
-
|
|
828
824
|
// NOW read the API key and API root (after setupFiles have run, including dotenv/config)
|
|
829
825
|
pluginState.apiKey = this.options.apiKey || process.env.TD_API_KEY;
|
|
830
826
|
pluginState.apiRoot =
|
|
@@ -876,7 +872,7 @@ class TestDriverReporter {
|
|
|
876
872
|
// Create test run via direct API call
|
|
877
873
|
const testRunData = {
|
|
878
874
|
runId: pluginState.testRunId,
|
|
879
|
-
suiteName: getSuiteName(),
|
|
875
|
+
suiteName: getSuiteName(this.ctx),
|
|
880
876
|
...pluginState.gitInfo,
|
|
881
877
|
};
|
|
882
878
|
|
|
@@ -1095,27 +1091,25 @@ class TestDriverReporter {
|
|
|
1095
1091
|
const sessionId = meta.sessionId || null;
|
|
1096
1092
|
const platform = meta.platform || null;
|
|
1097
1093
|
const sandboxId = meta.sandboxId || null;
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
? path.relative(pluginState.projectRoot, absolutePath)
|
|
1116
|
-
: absolutePath;
|
|
1117
|
-
logger.debug(`Resolved testFile from fallback: ${testFile}`);
|
|
1094
|
+
|
|
1095
|
+
// Test identity from Vitest's standard reporter API (TestCase in v4+).
|
|
1096
|
+
const projectName = test.project?.name || null;
|
|
1097
|
+
const projectRoot = test.project?.config?.root || process.cwd();
|
|
1098
|
+
const moduleId = test.module?.moduleId || null;
|
|
1099
|
+
let testFile =
|
|
1100
|
+
moduleId && !moduleId.includes("://") ? path.relative(projectRoot, moduleId) : "unknown";
|
|
1101
|
+
if (path.isAbsolute(testFile) || testFile.startsWith("..")) testFile = "unknown";
|
|
1102
|
+
|
|
1103
|
+
// Full nested describe path (top-level first), joined with " > ".
|
|
1104
|
+
const suitePath = [];
|
|
1105
|
+
{
|
|
1106
|
+
let cursor = test.parent;
|
|
1107
|
+
while (cursor && cursor.type === "suite") {
|
|
1108
|
+
suitePath.unshift(cursor.name);
|
|
1109
|
+
cursor = cursor.parent;
|
|
1110
|
+
}
|
|
1118
1111
|
}
|
|
1112
|
+
const suiteName = suitePath.length > 0 ? suitePath.join(" > ") : null;
|
|
1119
1113
|
|
|
1120
1114
|
// Update test run platform from first test that reports it
|
|
1121
1115
|
if (platform && !pluginState.detectedPlatform) {
|
|
@@ -1151,7 +1145,6 @@ class TestDriverReporter {
|
|
|
1151
1145
|
// We only want actual SDK crashes and exceptions reported to Sentry.
|
|
1152
1146
|
}
|
|
1153
1147
|
|
|
1154
|
-
const suiteName = test.suite?.name;
|
|
1155
1148
|
const startTime = Date.now() - duration; // Calculate start time from duration
|
|
1156
1149
|
// In Vitest v4, retryCount is on diagnostic(), not result()
|
|
1157
1150
|
// result() only returns { state, errors }, while diagnostic() has retryCount, duration, etc.
|
|
@@ -1161,12 +1154,14 @@ class TestDriverReporter {
|
|
|
1161
1154
|
const consoleUrl = getConsoleUrl(pluginState.apiRoot);
|
|
1162
1155
|
const hasRetries = retryCount > 0 && dashcamUrls.length > 1;
|
|
1163
1156
|
|
|
1164
|
-
// Record a single test case with all metadata
|
|
1157
|
+
// Record a single test case with all metadata.
|
|
1158
|
+
// Field names match the current API contract; `projectName` is a
|
|
1159
|
+
// forward-compatible addition (ignored by the API today).
|
|
1165
1160
|
const testCaseData = {
|
|
1166
1161
|
runId: testRunId,
|
|
1167
1162
|
testName: test.name,
|
|
1168
1163
|
testFile: testFile,
|
|
1169
|
-
|
|
1164
|
+
projectName: projectName,
|
|
1170
1165
|
status,
|
|
1171
1166
|
startTime: startTime,
|
|
1172
1167
|
endTime: Date.now(),
|
|
@@ -1202,7 +1197,7 @@ class TestDriverReporter {
|
|
|
1202
1197
|
if (errorStack) testCaseData.errorStack = errorStack;
|
|
1203
1198
|
|
|
1204
1199
|
logger.debug(
|
|
1205
|
-
`Recording test case: ${test.name} (${status}) with testFile: ${testFile},
|
|
1200
|
+
`Recording test case: ${test.name} (${status}) with testFile: ${testFile}, project: ${projectName}, suite: ${suiteName || "(none)"}, duration: ${duration}ms, replay: ${dashcamUrl ? "yes" : "no"}`,
|
|
1206
1201
|
);
|
|
1207
1202
|
|
|
1208
1203
|
const testCaseResponse = await recordTestCaseDirect(
|
|
@@ -1311,32 +1306,13 @@ class TestDriverReporter {
|
|
|
1311
1306
|
interactions: testResult.interactions || { total: 0, cached: 0, byType: {} },
|
|
1312
1307
|
};
|
|
1313
1308
|
|
|
1314
|
-
//
|
|
1315
|
-
|
|
1309
|
+
// Use Vitest's stable per-test id as the filename — it's unique within
|
|
1310
|
+
// a run and avoids the name-collision problem entirely.
|
|
1316
1311
|
const resultDir = path.join(process.cwd(), ".testdriver", "results", testFile);
|
|
1317
1312
|
fs.mkdirSync(resultDir, { recursive: true });
|
|
1318
|
-
|
|
1319
|
-
// Include a stable unique suffix in the filename to avoid collisions
|
|
1320
|
-
// when multiple tests in the same file share the same name.
|
|
1321
|
-
const hashSourceParts = [];
|
|
1322
|
-
if (test.id) {
|
|
1323
|
-
hashSourceParts.push(String(test.id));
|
|
1324
|
-
}
|
|
1325
|
-
if (Array.isArray(test.suitePath)) {
|
|
1326
|
-
hashSourceParts.push(test.suitePath.join(" > "));
|
|
1327
|
-
}
|
|
1328
|
-
if (test.file && (test.file.name || test.file.path)) {
|
|
1329
|
-
hashSourceParts.push(test.file.name || test.file.path);
|
|
1330
|
-
}
|
|
1331
|
-
// Fallback to the test name if no other identifiers are available.
|
|
1332
|
-
if (hashSourceParts.length === 0) {
|
|
1333
|
-
hashSourceParts.push(test.name || "unknown");
|
|
1334
|
-
}
|
|
1335
|
-
const hashSource = hashSourceParts.join(" | ");
|
|
1336
|
-
const uniqueHash = crypto.createHash("sha256").update(hashSource).digest("hex").slice(0, 8);
|
|
1337
|
-
|
|
1313
|
+
const safeId = (test.id || "unknown").replace(/[^\w.-]/g, "_");
|
|
1338
1314
|
fs.writeFileSync(
|
|
1339
|
-
path.join(resultDir, `${
|
|
1315
|
+
path.join(resultDir, `${safeId}.json`),
|
|
1340
1316
|
JSON.stringify(resultData, null, 2),
|
|
1341
1317
|
);
|
|
1342
1318
|
}
|
|
@@ -1411,7 +1387,14 @@ function generateRunId() {
|
|
|
1411
1387
|
return `${Date.now()}-${crypto.randomBytes(4).toString("hex")}`;
|
|
1412
1388
|
}
|
|
1413
1389
|
|
|
1414
|
-
function getSuiteName() {
|
|
1390
|
+
function getSuiteName(ctx) {
|
|
1391
|
+
// Derived from Vitest's configured projects (joined when multiple).
|
|
1392
|
+
// Must always return a string: the test-run-create API requires suiteName.
|
|
1393
|
+
const projects = ctx?.projects;
|
|
1394
|
+
if (Array.isArray(projects) && projects.length > 0) {
|
|
1395
|
+
const names = projects.map((p) => p?.name).filter(Boolean);
|
|
1396
|
+
if (names.length > 0) return names.join(",");
|
|
1397
|
+
}
|
|
1415
1398
|
return process.env.npm_package_name || path.basename(process.cwd());
|
|
1416
1399
|
}
|
|
1417
1400
|
|
package/lib/vitest/hooks.mjs
CHANGED
|
@@ -433,25 +433,20 @@ export function TestDriver(context, options = {}) {
|
|
|
433
433
|
testdriver._debugOnFailure = mergedOptions.debugOnFailure || false;
|
|
434
434
|
testDriverInstances.set(context.task, testdriver);
|
|
435
435
|
|
|
436
|
-
// Set platform metadata early so the reporter can show the correct OS from
|
|
436
|
+
// Set platform metadata early so the reporter can show the correct OS from
|
|
437
|
+
// the start. Test identity (file / suite / name) comes from Vitest's own
|
|
438
|
+
// task tree in the reporter — we deliberately do not duplicate it here.
|
|
437
439
|
if (!context.task.meta) {
|
|
438
440
|
context.task.meta = {};
|
|
439
441
|
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
const
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
context.task.meta.platform = platform;
|
|
450
|
-
context.task.meta.testFile = testFile;
|
|
451
|
-
context.task.meta.testOrder = 0;
|
|
452
|
-
|
|
453
|
-
// Pass test file name to SDK for debugger display
|
|
454
|
-
testdriver.testFile = testFile;
|
|
442
|
+
context.task.meta.platform = mergedOptions.os || "linux";
|
|
443
|
+
|
|
444
|
+
// Pass test file name to SDK for debugger display. Use Vitest's standard
|
|
445
|
+
// runner-task `file.filepath` rather than reconstructing identity ourselves.
|
|
446
|
+
const taskFilepath = context.task.file?.filepath || null;
|
|
447
|
+
testdriver.testFile = taskFilepath
|
|
448
|
+
? path.relative(process.cwd(), taskFilepath)
|
|
449
|
+
: null;
|
|
455
450
|
|
|
456
451
|
const debugConsoleSpy = process.env.TD_DEBUG_CONSOLE_SPY === "true";
|
|
457
452
|
|
|
@@ -570,21 +565,10 @@ export function TestDriver(context, options = {}) {
|
|
|
570
565
|
context.task.meta = {};
|
|
571
566
|
}
|
|
572
567
|
|
|
573
|
-
//
|
|
574
|
-
//
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
context.task.file?.filepath || context.task.file?.name || "unknown";
|
|
578
|
-
const projectRoot = process.cwd();
|
|
579
|
-
const testFile =
|
|
580
|
-
absolutePath !== "unknown"
|
|
581
|
-
? path.relative(projectRoot, absolutePath)
|
|
582
|
-
: absolutePath;
|
|
583
|
-
|
|
584
|
-
// Set basic metadata that's always available
|
|
585
|
-
context.task.meta.platform = platform;
|
|
586
|
-
context.task.meta.testFile = testFile;
|
|
587
|
-
context.task.meta.testOrder = 0;
|
|
568
|
+
// Refresh SDK-owned metadata. Test identity (file / suite / name) is
|
|
569
|
+
// read directly from the Vitest task tree by the reporter — we only
|
|
570
|
+
// store things Vitest can't know about (platform, session, dashcam).
|
|
571
|
+
context.task.meta.platform = currentInstance.os || "linux";
|
|
588
572
|
context.task.meta.sessionId = currentInstance.getSessionId?.() || null;
|
|
589
573
|
|
|
590
574
|
// Initialize dashcamUrls array for tracking per-attempt URLs (persists across retries)
|
|
@@ -624,7 +608,7 @@ export function TestDriver(context, options = {}) {
|
|
|
624
608
|
globalThis.__testdriverPlugin.registerDashcamUrl(
|
|
625
609
|
context.task.id,
|
|
626
610
|
dashcamUrl,
|
|
627
|
-
platform,
|
|
611
|
+
context.task.meta.platform,
|
|
628
612
|
attemptNumber,
|
|
629
613
|
);
|
|
630
614
|
}
|
|
@@ -695,6 +679,21 @@ export function TestDriver(context, options = {}) {
|
|
|
695
679
|
const sbx = currentInstance.sandbox || {};
|
|
696
680
|
const apiRoot = currentInstance.config?.TD_API_ROOT || null;
|
|
697
681
|
|
|
682
|
+
const taskFilepath = context.task.file?.filepath || null;
|
|
683
|
+
const testFileRel = taskFilepath
|
|
684
|
+
? path.relative(process.cwd(), taskFilepath)
|
|
685
|
+
: null;
|
|
686
|
+
const suiteParts = [];
|
|
687
|
+
{
|
|
688
|
+
let cursor = context.task.suite;
|
|
689
|
+
while (cursor && cursor.type === "suite") {
|
|
690
|
+
suiteParts.unshift(cursor.name);
|
|
691
|
+
cursor = cursor.suite;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
const fullSuiteName =
|
|
695
|
+
suiteParts.length > 0 ? suiteParts.join(" > ") : null;
|
|
696
|
+
|
|
698
697
|
context.task.meta.testResult = {
|
|
699
698
|
// Versions
|
|
700
699
|
sdkVersion: sdkPkg.version || null,
|
|
@@ -715,9 +714,9 @@ export function TestDriver(context, options = {}) {
|
|
|
715
714
|
sessionId: currentInstance.getSessionId?.() || null,
|
|
716
715
|
|
|
717
716
|
// Test info
|
|
718
|
-
testFile:
|
|
717
|
+
testFile: testFileRel,
|
|
719
718
|
testName: context.task.name || null,
|
|
720
|
-
suiteName:
|
|
719
|
+
suiteName: fullSuiteName,
|
|
721
720
|
|
|
722
721
|
// Test result
|
|
723
722
|
testPassed: context.task.result?.state === "pass",
|