testdriverai 5.5.4 → 5.5.6
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.js +29 -39
- package/docs/account/dashboard.mdx +16 -0
- package/docs/account/enterprise.mdx +97 -0
- package/docs/account/pricing.mdx +26 -0
- package/docs/account/projects.mdx +27 -0
- package/docs/account/team.mdx +31 -0
- package/docs/action/browser.mdx +1 -1
- package/docs/action/os.mdx +1 -2
- package/docs/action/output.mdx +2 -2
- package/docs/action/performance.mdx +4 -0
- package/docs/action/prerun.mdx +57 -1
- package/docs/action/secrets.mdx +3 -3
- package/docs/action/setup.mdx +6 -6
- package/docs/apps/chrome-extensions.mdx +41 -0
- package/docs/apps/desktop-apps.mdx +87 -0
- package/docs/apps/mobile-apps.mdx +22 -0
- package/docs/apps/static-websites.mdx +54 -0
- package/docs/bugs/jira.mdx +35 -28
- package/docs/cli/overview.mdx +19 -13
- package/docs/commands/assert.mdx +2 -0
- package/docs/commands/exec.mdx +96 -0
- package/docs/commands/focus-application.mdx +2 -0
- package/docs/commands/hover-image.mdx +2 -0
- package/docs/commands/hover-text.mdx +2 -0
- package/docs/commands/if.mdx +3 -2
- package/docs/commands/issues.mdx +27 -0
- package/docs/commands/match-image.mdx +2 -0
- package/docs/commands/press-keys.mdx +9 -5
- package/docs/commands/run.mdx +2 -1
- package/docs/commands/scroll-until-image.mdx +3 -1
- package/docs/commands/scroll-until-text.mdx +2 -0
- package/docs/commands/scroll.mdx +3 -1
- package/docs/commands/type.mdx +3 -1
- package/docs/commands/wait-for-image.mdx +3 -1
- package/docs/commands/wait-for-text.mdx +3 -1
- package/docs/commands/wait.mdx +3 -1
- package/docs/docs.json +260 -146
- package/docs/exporting/playwright.mdx +33 -26
- package/docs/features/auto-healing.mdx +25 -20
- package/docs/features/cross-platform.mdx +9 -8
- package/docs/features/generation.mdx +4 -3
- package/docs/features/github.mdx +22 -18
- package/docs/features/parallel-testing.mdx +15 -11
- package/docs/features/reusable-snippets.mdx +18 -14
- package/docs/features/selectorless.mdx +8 -3
- package/docs/features/visual-assertions.mdx +9 -10
- package/docs/getting-started/ci.mdx +7 -8
- package/docs/getting-started/editing.mdx +2 -0
- package/docs/getting-started/generating.mdx +1 -1
- package/docs/getting-started/running.mdx +2 -2
- package/docs/getting-started/setup.mdx +5 -12
- package/docs/getting-started/vscode.mdx +67 -79
- package/docs/getting-started/writing.mdx +7 -5
- package/docs/guide/assertions.mdx +6 -6
- package/docs/guide/authentication.mdx +18 -14
- package/docs/guide/code.mdx +3 -3
- package/docs/guide/environment-variables.mdx +64 -0
- package/docs/guide/lifecycle.mdx +154 -0
- package/docs/guide/locating.mdx +9 -9
- package/docs/guide/variables.mdx +9 -6
- package/docs/guide/waiting.mdx +9 -8
- package/docs/images/content/account/newprojectsettings.png +0 -0
- package/docs/images/content/account/projectpage.png +0 -0
- package/docs/images/content/account/projectreplays.png +0 -0
- package/docs/images/content/account/team-manage.png +0 -0
- package/docs/images/content/account/teampage.png +0 -0
- package/docs/images/content/side-by-side.png +0 -0
- package/docs/images/content/vscode/vscode-agent-preview.png +0 -0
- package/docs/images/content/vscode/vscode-copilot-ask.png +0 -0
- package/docs/images/content/vscode/vscode-file-creation.png +0 -0
- package/docs/images/content/vscode/vscode-install.png +0 -0
- package/docs/images/content/vscode/vscode-overview.png +0 -0
- package/docs/images/content/vscode/vscode-setup-walkthrough.png +0 -0
- package/docs/images/content/vscode/vscode-stopchat.png +0 -0
- package/docs/images/content/vscode/vscode-stoptest.png +0 -0
- package/docs/images/content/vscode/vscode-tdservice.png +0 -0
- package/docs/images/content/vscode/vscode-test-output.png +0 -0
- package/docs/images/content/vscode/vscode-testhistory.png +0 -0
- package/docs/images/content/vscode/vscode-testpane-runtests.png +0 -0
- package/docs/images/content/vscode/vscode-testpane.png +0 -0
- package/docs/importing/csv.mdx +9 -6
- package/docs/importing/gherkin.mdx +12 -10
- package/docs/importing/jira.mdx +11 -9
- package/docs/importing/testrail.mdx +10 -8
- package/docs/integrations/electron.mdx +26 -19
- package/docs/integrations/netlify.mdx +25 -24
- package/docs/integrations/vercel.mdx +22 -20
- package/docs/interactive/assert.mdx +4 -1
- package/docs/interactive/dry.mdx +51 -0
- package/docs/interactive/explore.mdx +92 -0
- package/docs/interactive/generate.mdx +6 -3
- package/docs/interactive/run.mdx +3 -0
- package/docs/interactive/save.mdx +3 -0
- package/docs/interactive/undo.mdx +3 -0
- package/docs/overview/comparison.mdx +6 -2
- package/docs/overview/faq.mdx +2 -1
- package/docs/overview/quickstart.mdx +123 -65
- package/docs/overview/upgrading.mdx +82 -0
- package/docs/overview/what-is-testdriver.mdx +13 -5
- package/docs/quickstart.mdx +1 -1
- package/docs/scenarios/ai-chatbot.mdx +26 -0
- package/docs/scenarios/cookie-banner.mdx +30 -0
- package/docs/scenarios/file-upload.mdx +30 -0
- package/docs/scenarios/form-filling.mdx +28 -0
- package/docs/scenarios/log-in.mdx +68 -0
- package/docs/scenarios/pdf-generation.mdx +21 -0
- package/docs/scenarios/spell-check.mdx +21 -0
- package/docs/security/action.mdx +7 -3
- package/docs/security/agent.mdx +1 -1
- package/docs/security/platform.mdx +9 -1
- package/docs/snippets/calendar-link.mdx +1 -0
- package/docs/snippets/gitignore-warning.mdx +4 -0
- package/docs/snippets/test-prereqs.mdx +15 -0
- package/docs/tutorials/advanced-test.mdx +2 -0
- package/docs/tutorials/basic-test.mdx +8 -7
- package/lib/commands.js +40 -21
- package/lib/config.js +0 -1
- package/lib/logger.js +2 -2
- package/lib/parser.js +1 -0
- package/lib/sdk.js +32 -26
- package/package.json +2 -1
- package/schema.json +1 -4
- package/styles/config/vocabularies/Docs/accept.txt +15 -2
- package/styles/config/vocabularies/Docs/reject.txt +4 -0
- package/docs/30x30.mdx +0 -84
- package/docs/issues.mdx +0 -9
- package/docs/security/dashboard.mdx +0 -0
- package/testdriver/chrome.yaml +0 -102
package/docs/docs.json
CHANGED
|
@@ -1,152 +1,266 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
"$schema": "https://mintlify.com/docs.json",
|
|
3
|
+
"theme": "mint",
|
|
4
|
+
"name": "TestDriver",
|
|
5
|
+
"colors": {
|
|
6
|
+
"primary": "#b3d334",
|
|
7
|
+
"light": "#b3d334",
|
|
8
|
+
"dark": "#152a65"
|
|
9
|
+
},
|
|
10
|
+
"appearance": {
|
|
11
|
+
"default": "dark"
|
|
12
|
+
},
|
|
13
|
+
"favicon": "/images/template/icon.png",
|
|
14
|
+
"navigation": {
|
|
15
|
+
"tabs": [
|
|
16
|
+
{
|
|
17
|
+
"tab": "Overview",
|
|
18
|
+
"groups": [
|
|
19
|
+
{
|
|
20
|
+
"group": "Intro",
|
|
21
|
+
"pages": [
|
|
22
|
+
"/overview/quickstart",
|
|
23
|
+
"/overview/what-is-testdriver",
|
|
24
|
+
"/overview/faq",
|
|
25
|
+
"/overview/comparison",
|
|
26
|
+
"/account/enterprise"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"group": "Features",
|
|
31
|
+
"pages": [
|
|
32
|
+
"/features/selectorless",
|
|
33
|
+
"/features/generation",
|
|
34
|
+
"/features/visual-assertions",
|
|
35
|
+
"/features/auto-healing",
|
|
36
|
+
"/features/cross-platform",
|
|
37
|
+
"/features/reusable-snippets",
|
|
38
|
+
"/features/parallel-testing",
|
|
39
|
+
"/features/github"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"group": "Security & Privacy",
|
|
44
|
+
"pages": [
|
|
45
|
+
"/security/agent",
|
|
46
|
+
"/security/action",
|
|
47
|
+
"/security/platform"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"group": "Account",
|
|
52
|
+
"pages": [
|
|
53
|
+
"/account/dashboard",
|
|
54
|
+
"/account/projects",
|
|
55
|
+
"/account/team"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"tab": "Guide",
|
|
62
|
+
"groups": [
|
|
63
|
+
{
|
|
64
|
+
"group": "Getting Started",
|
|
65
|
+
"pages": [
|
|
66
|
+
"/getting-started/setup",
|
|
67
|
+
"/getting-started/writing",
|
|
68
|
+
"/getting-started/generating",
|
|
69
|
+
"/getting-started/running",
|
|
70
|
+
"/getting-started/ci",
|
|
71
|
+
"/getting-started/editing",
|
|
72
|
+
"/overview/upgrading"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"group": "Writing Tests",
|
|
77
|
+
"pages": [
|
|
78
|
+
"/guide/locating",
|
|
79
|
+
"/guide/waiting",
|
|
80
|
+
"/guide/assertions",
|
|
81
|
+
"/guide/variables",
|
|
82
|
+
"/guide/authentication",
|
|
83
|
+
"/guide/lifecycle",
|
|
84
|
+
"/guide/code",
|
|
85
|
+
"/guide/environment-variables"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"group": "Running in CI",
|
|
90
|
+
"pages": [
|
|
91
|
+
"/action/setup",
|
|
92
|
+
"/action/browser",
|
|
93
|
+
"/action/os",
|
|
94
|
+
"/action/output",
|
|
95
|
+
"/action/performance",
|
|
96
|
+
"/action/prerun",
|
|
97
|
+
"/action/secrets"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"tab": "Examples",
|
|
104
|
+
"groups": [
|
|
105
|
+
{
|
|
106
|
+
"group": "Scenarios",
|
|
107
|
+
"pages": [
|
|
108
|
+
"scenarios/ai-chatbot",
|
|
109
|
+
"scenarios/cookie-banner",
|
|
110
|
+
"scenarios/file-upload",
|
|
111
|
+
"scenarios/form-filling",
|
|
112
|
+
"scenarios/log-in",
|
|
113
|
+
"scenarios/pdf-generation",
|
|
114
|
+
"scenarios/spell-check"
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"group": "Apps",
|
|
119
|
+
"pages": [
|
|
120
|
+
"apps/chrome-extensions",
|
|
121
|
+
"apps/desktop-apps",
|
|
122
|
+
"apps/mobile-apps",
|
|
123
|
+
"apps/static-websites"
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"tab": "Integrations",
|
|
130
|
+
"groups": [
|
|
131
|
+
{
|
|
132
|
+
"group": "Building",
|
|
133
|
+
"pages": [
|
|
134
|
+
"/integrations/electron",
|
|
135
|
+
"/integrations/netlify",
|
|
136
|
+
"/integrations/vercel"
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"group": "Importing",
|
|
141
|
+
"pages": [
|
|
142
|
+
"/importing/csv",
|
|
143
|
+
"/importing/gherkin",
|
|
144
|
+
"/importing/jira",
|
|
145
|
+
"/importing/testrail"
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"group": "Exporting",
|
|
150
|
+
"pages": [
|
|
151
|
+
"/exporting/playwright"
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"group": "Bug Reporting",
|
|
156
|
+
"pages": [
|
|
157
|
+
"/bugs/jira"
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"tab": "Reference",
|
|
164
|
+
"groups": [
|
|
165
|
+
{
|
|
166
|
+
"group": "Commands",
|
|
167
|
+
"pages": [
|
|
168
|
+
"/commands/assert",
|
|
169
|
+
"/commands/exec",
|
|
170
|
+
"/commands/focus-application",
|
|
171
|
+
"/commands/hover-image",
|
|
172
|
+
"/commands/hover-text",
|
|
173
|
+
"/commands/if",
|
|
174
|
+
"/commands/match-image",
|
|
175
|
+
"/commands/press-keys",
|
|
176
|
+
"/commands/run",
|
|
177
|
+
"/commands/scroll",
|
|
178
|
+
"/commands/scroll-until-image",
|
|
179
|
+
"/commands/scroll-until-text",
|
|
180
|
+
"/commands/type",
|
|
181
|
+
"/commands/wait",
|
|
182
|
+
"/commands/wait-for-image",
|
|
183
|
+
"/commands/wait-for-text",
|
|
184
|
+
"/commands/issues"
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"group": "Interactive Commands",
|
|
189
|
+
"pages": [
|
|
190
|
+
"/interactive/assert",
|
|
191
|
+
"/interactive/dry",
|
|
192
|
+
"/interactive/explore",
|
|
193
|
+
"/interactive/generate",
|
|
194
|
+
"/interactive/run",
|
|
195
|
+
"/interactive/save",
|
|
196
|
+
"/interactive/undo"
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"group": "CLI",
|
|
201
|
+
"pages": [
|
|
202
|
+
"/cli/overview"
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
"global": {
|
|
209
|
+
"anchors": [
|
|
210
|
+
{
|
|
211
|
+
"anchor": "Community",
|
|
212
|
+
"href": "https://discord.com/invite/cWDFW8DzPm",
|
|
213
|
+
"icon": "discord"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"anchor": "Book a Demo",
|
|
217
|
+
"href": "https://calendly.com/d/cq23-qyn-3v6/testdriver-ai-demo",
|
|
218
|
+
"icon": "calendar"
|
|
219
|
+
}
|
|
23
220
|
]
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"group": "Getting Started",
|
|
27
|
-
"pages": [
|
|
28
|
-
"/getting-started/vscode",
|
|
29
|
-
"/getting-started/setup",
|
|
30
|
-
"/getting-started/writing",
|
|
31
|
-
"/getting-started/generating",
|
|
32
|
-
"/getting-started/running",
|
|
33
|
-
"/getting-started/ci",
|
|
34
|
-
"/features/auto-healing",
|
|
35
|
-
"/getting-started/editing"
|
|
36
|
-
]
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"group": "Writing Tests",
|
|
40
|
-
"pages": [
|
|
41
|
-
"/guide/locating",
|
|
42
|
-
"/guide/waiting",
|
|
43
|
-
"/guide/assertions",
|
|
44
|
-
"/guide/variables",
|
|
45
|
-
"/guide/authentication",
|
|
46
|
-
"/guide/lifecycle",
|
|
47
|
-
"/guide/code"
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"group": "Running in CI",
|
|
52
|
-
"pages": [
|
|
53
|
-
"/action/setup",
|
|
54
|
-
"/action/browser",
|
|
55
|
-
"/action/os",
|
|
56
|
-
"/action/output",
|
|
57
|
-
"/action/performance",
|
|
58
|
-
"/action/prerun",
|
|
59
|
-
"/action/secrets"
|
|
60
|
-
]
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"group": "Security & Privacy",
|
|
64
|
-
"pages": [
|
|
65
|
-
"/security/agent",
|
|
66
|
-
"/security/action",
|
|
67
|
-
"/security/platform"
|
|
68
|
-
]
|
|
69
|
-
}
|
|
70
|
-
]
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"tab": "Reference",
|
|
74
|
-
"groups": [
|
|
75
|
-
{
|
|
76
|
-
"group": "Commands",
|
|
77
|
-
"pages": [
|
|
78
|
-
"/commands/assert",
|
|
79
|
-
"/commands/exec",
|
|
80
|
-
"/commands/focus-application",
|
|
81
|
-
"/commands/hover-image",
|
|
82
|
-
"/commands/hover-text",
|
|
83
|
-
"/commands/match-image",
|
|
84
|
-
"/commands/if",
|
|
85
|
-
"/commands/press-keys",
|
|
86
|
-
"/commands/run",
|
|
87
|
-
"/commands/scroll",
|
|
88
|
-
"/commands/scroll-until-image",
|
|
89
|
-
"/commands/scroll-until-text",
|
|
90
|
-
"/commands/type",
|
|
91
|
-
"/commands/wait",
|
|
92
|
-
"/commands/wait-for-image",
|
|
93
|
-
"/commands/wait-for-text"
|
|
94
|
-
]
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"group": "Interactive Commands",
|
|
98
|
-
"pages": [
|
|
99
|
-
"/interactive/assert",
|
|
100
|
-
"/interactive/undo",
|
|
101
|
-
"/interactive/save",
|
|
102
|
-
"/interactive/run",
|
|
103
|
-
"/interactive/generate"
|
|
104
|
-
]
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"group": "CLI",
|
|
108
|
-
"pages": ["/cli/overview"]
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
"global": {
|
|
114
|
-
"anchors": [
|
|
115
|
-
{
|
|
116
|
-
"anchor": "Community",
|
|
117
|
-
"href": "https://discord.com/invite/cWDFW8DzPm",
|
|
118
|
-
"icon": "discord"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"anchor": "Book a Demo",
|
|
122
|
-
"href": "https://calendly.com/d/cq23-qyn-3v6/testdriver-ai-demo",
|
|
123
|
-
"icon": "calendar"
|
|
124
221
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
"
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
222
|
+
},
|
|
223
|
+
"modeToggle": {
|
|
224
|
+
"enabled": false,
|
|
225
|
+
"default": "dark"
|
|
226
|
+
},
|
|
227
|
+
"logo": {
|
|
228
|
+
"light": "/images/template/light.png",
|
|
229
|
+
"dark": "/images/template/dark.png",
|
|
230
|
+
"href": "https://testdriver.ai"
|
|
231
|
+
},
|
|
232
|
+
"navbar": {
|
|
233
|
+
"links": [
|
|
234
|
+
{
|
|
235
|
+
"label": "GitHub",
|
|
236
|
+
"href": "https://github.com/testdriverai/testdriverai"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"label": "Report an Issue",
|
|
240
|
+
"href": "https://github.com/testdriverai/testdriverai/issues/new"
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"primary": {
|
|
244
|
+
"type": "button",
|
|
245
|
+
"label": "Dashboard",
|
|
246
|
+
"href": "https://app.testdriver.ai"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"footer": {
|
|
250
|
+
"socials": {
|
|
251
|
+
"x": "https://x.com/testdriverai",
|
|
252
|
+
"github": "https://github.com/testdriverai",
|
|
253
|
+
"discord": "https://discord.com/invite/cWDFW8DzPm",
|
|
254
|
+
"youtube": "https://www.youtube.com/@testdriverai"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"redirects": [],
|
|
258
|
+
"integrations": {
|
|
259
|
+
"segment": {
|
|
260
|
+
"key": "oh4PK60u4Qvm2DKIjxfhxd0KCdRbQsQE"
|
|
261
|
+
},
|
|
262
|
+
"posthog": {
|
|
263
|
+
"apiKey": "phc_ovOQ2HFpqFwPVqaxE5plJmI9buPMsz024FB2iajItqn"
|
|
150
264
|
}
|
|
151
265
|
}
|
|
152
266
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Playwright Export"
|
|
3
3
|
sidebarTitle: "Playwright"
|
|
4
|
-
description: "A comprehensive guide to integrating TestDriver
|
|
4
|
+
description: "A comprehensive guide to integrating TestDriver with Playwright for automated test generation."
|
|
5
|
+
icon: "masks-theater"
|
|
5
6
|
---
|
|
6
7
|
|
|
7
|
-
This guide explains how to use **TestDriver
|
|
8
|
+
This guide explains how to use **TestDriver** to generate Playwright test scripts and integrate them into your repository using a GitHub Actions workflow. The workflow automates the process of generating Playwright tests, creating a pull request with the generated test, and ensuring all dependencies are installed.
|
|
8
9
|
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
## Workflow Overview
|
|
12
13
|
|
|
13
14
|
1. **Install Playwright**: The workflow installs Playwright and its dependencies.
|
|
14
|
-
2. **Generate Playwright Test**: TestDriver
|
|
15
|
+
2. **Generate Playwright Test**: TestDriver generates a Playwright test script using the `playwright codegen` tool.
|
|
15
16
|
3. **Create Pull Request**: The generated test is committed to a new branch, and a pull request is created for review.
|
|
16
17
|
|
|
17
18
|
---
|
|
@@ -19,19 +20,19 @@ This guide explains how to use **TestDriver.ai** to generate Playwright test scr
|
|
|
19
20
|
## Prerequisites
|
|
20
21
|
|
|
21
22
|
1. **GitHub Repository**: Ensure your project is hosted on GitHub.
|
|
22
|
-
2. **TestDriver
|
|
23
|
+
2. **TestDriver API Key**: Store your API key as a GitHub secret (e.g., `TD_API_KEY`).
|
|
23
24
|
3. **Node.js Installed**: Playwright requires Node.js to run.
|
|
24
25
|
|
|
25
26
|
---
|
|
26
27
|
|
|
27
28
|
## GitHub Actions Workflow
|
|
28
29
|
|
|
29
|
-
Here
|
|
30
|
+
Here's the GitHub Actions workflow to automate the process:
|
|
30
31
|
|
|
31
32
|
### Workflow File: `.github/workflows/playwright.yml`
|
|
32
33
|
|
|
33
34
|
```yaml
|
|
34
|
-
name: TestDriver
|
|
35
|
+
name: TestDriver / Playwright
|
|
35
36
|
|
|
36
37
|
on:
|
|
37
38
|
push:
|
|
@@ -56,11 +57,11 @@ jobs:
|
|
|
56
57
|
|
|
57
58
|
- uses: testdriverai/action@main
|
|
58
59
|
with:
|
|
59
|
-
key: ${{ secrets.
|
|
60
|
+
key: ${{ secrets.TD_API_KEY }}
|
|
60
61
|
|
|
61
62
|
create-pr: true
|
|
62
63
|
pr-base: main
|
|
63
|
-
pr-title: "TestDriver
|
|
64
|
+
pr-title: "TestDriver / Generate Playwright Test"
|
|
64
65
|
pr-branch: generate-playwright
|
|
65
66
|
pr-test-filename: generate-playwright.yml
|
|
66
67
|
|
|
@@ -90,70 +91,76 @@ jobs:
|
|
|
90
91
|
## Workflow Steps Explained
|
|
91
92
|
|
|
92
93
|
### 1. **Check Out Repository**
|
|
93
|
-
The workflow checks out the repository to ensure the latest code is available for the test generation process
|
|
94
|
+
The workflow checks out the repository to ensure the latest code is available for the test generation process.
|
|
95
|
+
```yaml
|
|
94
96
|
- name: Check out repository
|
|
95
97
|
uses: actions/checkout@v2
|
|
96
98
|
with:
|
|
97
99
|
ref: $\{\{ github.event.ref }}
|
|
98
|
-
|
|
99
100
|
```
|
|
100
101
|
|
|
101
102
|
---
|
|
102
103
|
|
|
103
104
|
### 2. **Install Playwright**
|
|
104
|
-
The `prerun` script installs Playwright globally and sets up its dependencies (e.g., Chromium browser)
|
|
105
|
+
The `prerun` script installs Playwright globally and sets up its dependencies (e.g., Chromium browser).
|
|
106
|
+
```bash
|
|
105
107
|
npm install playwright -g
|
|
106
108
|
playwright install --with-deps chromium
|
|
107
109
|
|
|
108
|
-
|
|
110
|
+
```
|
|
111
|
+
---
|
|
109
112
|
|
|
110
113
|
### 3. **Generate Playwright Test**
|
|
111
|
-
The `playwright codegen` command generates a Playwright test script (`pw-test.spec.js`) for the specified URL (`https://airbnb.com`)
|
|
114
|
+
The `playwright codegen` command generates a Playwright test script (`pw-test.spec.js`) for the specified URL (`https://airbnb.com`).
|
|
115
|
+
```bash
|
|
112
116
|
npx playwright codegen --target playwright-test -o testdriver/pw-test.spec.js https://airbnb.com
|
|
113
|
-
|
|
114
|
-
|
|
117
|
+
```
|
|
118
|
+
---
|
|
115
119
|
|
|
116
120
|
### 4. **Create Pull Request**
|
|
117
|
-
The workflow commits the generated test script to a new branch (`generate-playwright`) and creates a pull request with the title `TestDriver
|
|
121
|
+
The workflow commits the generated test script to a new branch (`generate-playwright`) and creates a pull request with the title `TestDriver / Generate Playwright Test`.
|
|
122
|
+
```yaml
|
|
118
123
|
create-pr: true
|
|
119
124
|
pr-base: main
|
|
120
|
-
pr-title: "TestDriver
|
|
125
|
+
pr-title: "TestDriver / Generate Playwright Test"
|
|
121
126
|
pr-branch: generate-playwright
|
|
122
127
|
pr-test-filename: generate-playwright.yml
|
|
123
|
-
|
|
124
128
|
```
|
|
125
129
|
|
|
126
130
|
---
|
|
127
131
|
|
|
128
132
|
## Running the Workflow
|
|
129
133
|
|
|
130
|
-
|
|
134
|
+
<Steps>
|
|
135
|
+
<Step title="Trigger the Workflow">
|
|
131
136
|
- Push changes to the `main` branch.
|
|
132
137
|
- Open a pull request.
|
|
133
138
|
- Manually trigger the workflow using the **workflow_dispatch** event.
|
|
134
|
-
|
|
135
|
-
|
|
139
|
+
</Step>
|
|
140
|
+
<Step title="Review the Pull Request">
|
|
136
141
|
- Navigate to the **Pull Requests** tab in your GitHub repository.
|
|
137
142
|
- Review the generated Playwright test script (`pw-test.spec.js`).
|
|
143
|
+
</Step>
|
|
138
144
|
|
|
139
|
-
|
|
145
|
+
<Step title="Merge the Pull Request">
|
|
140
146
|
- Once reviewed, merge the pull request to include the generated test in your repository.
|
|
141
|
-
|
|
147
|
+
</Step>
|
|
148
|
+
</Steps>
|
|
142
149
|
---
|
|
143
150
|
|
|
144
151
|
## Example Output
|
|
145
152
|
|
|
146
153
|
- **Generated Test File**: `testdriver/pw-test.spec.js`
|
|
147
|
-
- **Pull Request**: A new pull request titled `TestDriver
|
|
154
|
+
- **Pull Request**: A new pull request titled `TestDriver / Generate Playwright Test` will be created.
|
|
148
155
|
|
|
149
156
|
---
|
|
150
157
|
|
|
151
158
|
## Best Practices
|
|
152
159
|
|
|
153
|
-
1. **Secure API Key**: Store the TestDriver
|
|
160
|
+
1. **Secure API Key**: Store the TestDriver API key as a GitHub secret to avoid exposing sensitive information.
|
|
154
161
|
2. **Review Generated Tests**: Always review the generated Playwright test scripts to ensure they meet your requirements.
|
|
155
162
|
3. **Customize Test Generation**: Modify the `playwright codegen` command to target specific URLs or workflows.
|
|
156
163
|
|
|
157
164
|
---
|
|
158
165
|
|
|
159
|
-
By following this guide, you can seamlessly integrate TestDriver
|
|
166
|
+
By following this guide, you can seamlessly integrate TestDriver with Playwright to generate and manage end-to-end tests in your GitHub repository.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Auto-Healing in TestDriver
|
|
2
|
+
title: "Auto-Healing in TestDriver"
|
|
3
3
|
sidebarTitle: "Auto-Healing"
|
|
4
|
-
description: "Learn how TestDriver
|
|
4
|
+
description: "Learn how TestDriver's auto-healing feature keeps your tests resilient and up-to-date with minimal manual effort."
|
|
5
5
|
icon: "bandage"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
Auto-healing is a powerful feature in TestDriver
|
|
8
|
+
Auto-healing is a powerful feature in TestDriver that ensures your tests remain resilient even when the application under test changes.
|
|
9
9
|
|
|
10
10
|
When TestDriver steps fail, the AI will progressively fall back to attempt to complete the test.
|
|
11
11
|
|
|
@@ -20,15 +20,16 @@ If running on CI, TestDriver will open a pull request (PR) with the updated test
|
|
|
20
20
|
|
|
21
21
|
## How Auto-Healing Works
|
|
22
22
|
|
|
23
|
-
1. **Test Execution**: TestDriver
|
|
23
|
+
1. **Test Execution**: TestDriver runs your test suite as usual.
|
|
24
24
|
2. **Failure Detection**: If a test fails due to a change in the application (e.g., text or UI updates), the AI identifies the failure point.
|
|
25
25
|
3. **Recovery Attempt**: The AI uses its adaptive capabilities to locate the updated element or text and retries the action.
|
|
26
|
-
4. **Test Update**: If the recovery is successful, TestDriver
|
|
26
|
+
4. **Test Update**: If the recovery is successful, TestDriver updates the test script with the new element or text.
|
|
27
27
|
5. **Pull Request Creation**: The updated test script is committed to a new branch, and a pull request is automatically opened in your repository for review.
|
|
28
28
|
|
|
29
29
|
### Example: Button Text Changes from "Submit" to "Send"
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
<Steps>
|
|
32
|
+
<Step title="Initial Test">
|
|
32
33
|
|
|
33
34
|
```yaml {2}
|
|
34
35
|
- command: hover-text
|
|
@@ -36,18 +37,20 @@ If running on CI, TestDriver will open a pull request (PR) with the updated test
|
|
|
36
37
|
description: Submit button in the form
|
|
37
38
|
action: click
|
|
38
39
|
```
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
</Step>
|
|
41
|
+
<Step title="Application Update">
|
|
41
42
|
- The button text is changed from "Submit" to "Send" in the application.
|
|
43
|
+
</Step>
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
- TestDriver
|
|
45
|
+
<Step title="Test Execution">
|
|
46
|
+
- TestDriver runs the test and fails to find the "Submit" button.
|
|
47
|
+
</Step>
|
|
45
48
|
|
|
46
|
-
|
|
49
|
+
<Step title="Auto-Healing">
|
|
47
50
|
- The AI detects the failure and searches for a similar element.
|
|
48
51
|
- It identifies the "Send" button as the updated element and retries the action.
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
</Step>
|
|
53
|
+
<Step title="Test Update">
|
|
51
54
|
- The test script is updated to reflect the new button text:
|
|
52
55
|
|
|
53
56
|
```yaml {2}
|
|
@@ -56,18 +59,20 @@ If running on CI, TestDriver will open a pull request (PR) with the updated test
|
|
|
56
59
|
description: Submit button in the form
|
|
57
60
|
action: click
|
|
58
61
|
```
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
- TestDriver
|
|
62
|
+
</Step>
|
|
63
|
+
<Step title="Pull Request Creation">
|
|
64
|
+
- TestDriver commits the updated test to a new branch and opens a PR:
|
|
62
65
|
- **Branch Name**: `auto-heal-update-submit-to-send`
|
|
63
66
|
- **PR Title**: `Auto-Healed Test: Updated "Submit" to "Send"`
|
|
64
67
|
|
|
68
|
+
</Step>
|
|
69
|
+
</Steps>
|
|
65
70
|
## Example GitHub Action for Auto-Healing
|
|
66
71
|
|
|
67
|
-
Here
|
|
72
|
+
Here's how you can configure a GitHub Action to enable auto-healing and PR creation:
|
|
68
73
|
|
|
69
74
|
```yaml {24-30}
|
|
70
|
-
name: TestDriver
|
|
75
|
+
name: TestDriver Auto-Healing
|
|
71
76
|
|
|
72
77
|
on:
|
|
73
78
|
push:
|
|
@@ -84,10 +89,10 @@ jobs:
|
|
|
84
89
|
- name: Check out repository
|
|
85
90
|
uses: actions/checkout@v2
|
|
86
91
|
|
|
87
|
-
- name: Run TestDriver
|
|
92
|
+
- name: Run TestDriver
|
|
88
93
|
uses: testdriverai/action@main
|
|
89
94
|
with:
|
|
90
|
-
key: ${{ secrets.
|
|
95
|
+
key: ${{ secrets.TD_API_KEY }}
|
|
91
96
|
prompt: |
|
|
92
97
|
1. /run testdriver/onboarding.yaml --save
|
|
93
98
|
create-pr: true
|