testdriverai 7.2.63 → 7.2.65

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 (362) hide show
  1. package/agent/index.js +77 -59
  2. package/agent/interface.js +11 -251
  3. package/agent/lib/debugger-server.js +2 -1
  4. package/agent/lib/logger.js +56 -0
  5. package/agent/lib/sandbox.js +79 -29
  6. package/ai/agents/test-writer.md +457 -0
  7. package/{docs/v7/ai.mdx → ai/skills/testdriver:ai/SKILL.md} +3 -5
  8. package/{docs/v7/assert.mdx → ai/skills/testdriver:assert/SKILL.md} +3 -4
  9. package/{docs/v7/aws-setup.mdx → ai/skills/testdriver:aws-setup/SKILL.md} +3 -4
  10. package/{docs/v7/caching.mdx → ai/skills/testdriver:caching/SKILL.md} +3 -7
  11. package/{docs/v7/captcha.mdx → ai/skills/testdriver:captcha/SKILL.md} +4 -5
  12. package/{docs/v7/ci-cd.mdx → ai/skills/testdriver:ci-cd/SKILL.md} +3 -4
  13. package/{docs/v7/click.mdx → ai/skills/testdriver:click/SKILL.md} +3 -4
  14. package/{docs/v7/client.mdx → ai/skills/testdriver:client/SKILL.md} +11 -5
  15. package/{docs/v7/cloud.mdx → ai/skills/testdriver:cloud/SKILL.md} +3 -4
  16. package/{docs/v7/customizing-devices.mdx → ai/skills/testdriver:customizing-devices/SKILL.md} +36 -26
  17. package/{docs/v7/dashcam.mdx → ai/skills/testdriver:dashcam/SKILL.md} +3 -4
  18. package/{docs/v7/device-config.mdx → ai/skills/testdriver:device-config/SKILL.md} +3 -3
  19. package/{docs/v7/double-click.mdx → ai/skills/testdriver:double-click/SKILL.md} +3 -3
  20. package/{docs/v7/elements.mdx → ai/skills/testdriver:elements/SKILL.md} +3 -4
  21. package/{docs/v7/enterprise.mdx → ai/skills/testdriver:enterprise/SKILL.md} +3 -5
  22. package/ai/skills/testdriver:examples/SKILL.md +7 -0
  23. package/{docs/v7/exec.mdx → ai/skills/testdriver:exec/SKILL.md} +3 -4
  24. package/{docs/v7/find.mdx → ai/skills/testdriver:find/SKILL.md} +81 -4
  25. package/{docs/v7/focus-application.mdx → ai/skills/testdriver:focus-application/SKILL.md} +3 -4
  26. package/{docs/v7/generating-tests.mdx → ai/skills/testdriver:generating-tests/SKILL.md} +3 -3
  27. package/{docs/v7/hover.mdx → ai/skills/testdriver:hover/SKILL.md} +3 -4
  28. package/{docs/v7/locating-elements.mdx → ai/skills/testdriver:locating-elements/SKILL.md} +3 -3
  29. package/{docs/v7/making-assertions.mdx → ai/skills/testdriver:making-assertions/SKILL.md} +3 -3
  30. package/ai/skills/testdriver:mcp-workflow/SKILL.md +410 -0
  31. package/{docs/v7/mouse-down.mdx → ai/skills/testdriver:mouse-down/SKILL.md} +3 -3
  32. package/{docs/v7/mouse-up.mdx → ai/skills/testdriver:mouse-up/SKILL.md} +3 -3
  33. package/{docs/v7/performing-actions.mdx → ai/skills/testdriver:performing-actions/SKILL.md} +3 -3
  34. package/{docs/v7/press-keys.mdx → ai/skills/testdriver:press-keys/SKILL.md} +3 -4
  35. package/{docs/v7/quickstart.mdx → ai/skills/testdriver:quickstart/SKILL.md} +3 -4
  36. package/{docs/v7/reusable-code.mdx → ai/skills/testdriver:reusable-code/SKILL.md} +3 -3
  37. package/{docs/v7/right-click.mdx → ai/skills/testdriver:right-click/SKILL.md} +3 -3
  38. package/{docs/v7/running-tests.mdx → ai/skills/testdriver:running-tests/SKILL.md} +3 -3
  39. package/{docs/v7/screenshot.mdx → ai/skills/testdriver:screenshot/SKILL.md} +3 -4
  40. package/{docs/v7/scroll.mdx → ai/skills/testdriver:scroll/SKILL.md} +3 -4
  41. package/{docs/v7/secrets.mdx → ai/skills/testdriver:secrets/SKILL.md} +3 -3
  42. package/{docs/v7/self-hosted.mdx → ai/skills/testdriver:self-hosted/SKILL.md} +3 -4
  43. package/ai/skills/testdriver:testdriver/SKILL.md +31 -0
  44. package/{docs/v7/type.mdx → ai/skills/testdriver:type/SKILL.md} +3 -4
  45. package/{docs/v7/variables.mdx → ai/skills/testdriver:variables/SKILL.md} +3 -3
  46. package/{docs/v7/waiting-for-elements.mdx → ai/skills/testdriver:waiting-for-elements/SKILL.md} +3 -3
  47. package/{docs/v7/what-is-testdriver.mdx → ai/skills/testdriver:what-is-testdriver/SKILL.md} +3 -3
  48. package/interfaces/cli/commands/init.js +278 -1
  49. package/interfaces/cli/commands/setup.js +382 -0
  50. package/interfaces/vitest-plugin.mjs +190 -122
  51. package/lib/core/Dashcam.js +22 -15
  52. package/lib/sentry.js +4 -3
  53. package/lib/vitest/hooks.mjs +70 -16
  54. package/lib/vitest/setup-aws.mjs +0 -10
  55. package/package.json +29 -9
  56. package/sdk.d.ts +32 -5
  57. package/sdk.js +10 -9
  58. package/.env.example +0 -4
  59. package/.github/workflows/acceptance-linux-scheduled.yaml +0 -45
  60. package/.github/workflows/acceptance-windows-scheduled.yaml +0 -54
  61. package/.github/workflows/acceptance.yaml +0 -87
  62. package/.github/workflows/publish.yaml +0 -68
  63. package/.github/workflows/test-init.yml +0 -145
  64. package/.github/workflows/testdriver.yml +0 -170
  65. package/.github/workflows/windows-self-hosted.yaml +0 -82
  66. package/.prettierignore +0 -4
  67. package/.prettierrc +0 -1
  68. package/CHANGELOG.md +0 -30
  69. package/agents.md +0 -455
  70. package/debugger/bg.png +0 -0
  71. package/debugger/icon.png +0 -0
  72. package/debugger/index.html +0 -797
  73. package/debugger/td.png +0 -0
  74. package/debugger/tray-buffered.png +0 -0
  75. package/debugger/tray.png +0 -0
  76. package/docs/GITHUB_COMMENTS.md +0 -330
  77. package/docs/GITHUB_COMMENTS_ANNOUNCEMENT.md +0 -167
  78. package/docs/QUICK-START-GITHUB-COMMENTS.md +0 -84
  79. package/docs/TEST-GITHUB-COMMENTS.md +0 -129
  80. package/docs/_scripts/link-replacer.js +0 -164
  81. package/docs/_scripts/upload-docs-to-openai.js +0 -284
  82. package/docs/docs.json +0 -393
  83. package/docs/github-integration-setup.md +0 -266
  84. package/docs/guide/best-practices-polling.mdx +0 -154
  85. package/docs/images/content/account/newprojectsettings.png +0 -0
  86. package/docs/images/content/account/projectpage.png +0 -0
  87. package/docs/images/content/account/projectreplays.png +0 -0
  88. package/docs/images/content/account/team-manage.png +0 -0
  89. package/docs/images/content/account/teampage.png +0 -0
  90. package/docs/images/content/extension/cursor.svg +0 -1
  91. package/docs/images/content/extension/vscode.svg +0 -57
  92. package/docs/images/content/extension/windsurf.svg +0 -3
  93. package/docs/images/content/self-hosted/launchtemplateid.png +0 -0
  94. package/docs/images/content/side-by-side.png +0 -0
  95. package/docs/images/content/vscode/ide-full.png +0 -0
  96. package/docs/images/content/vscode/running.png +0 -0
  97. package/docs/images/content/vscode/vscode-2-assert.png +0 -0
  98. package/docs/images/content/vscode/vscode-agent-preview.png +0 -0
  99. package/docs/images/content/vscode/vscode-copilot-ask.png +0 -0
  100. package/docs/images/content/vscode/vscode-file-creation.png +0 -0
  101. package/docs/images/content/vscode/vscode-install.png +0 -0
  102. package/docs/images/content/vscode/vscode-overview.png +0 -0
  103. package/docs/images/content/vscode/vscode-setup-walkthrough.png +0 -0
  104. package/docs/images/content/vscode/vscode-stopchat.png +0 -0
  105. package/docs/images/content/vscode/vscode-stoptest.png +0 -0
  106. package/docs/images/content/vscode/vscode-tdservice.png +0 -0
  107. package/docs/images/content/vscode/vscode-test-output.png +0 -0
  108. package/docs/images/content/vscode/vscode-testhistory.png +0 -0
  109. package/docs/images/content/vscode/vscode-testpane-runtests.png +0 -0
  110. package/docs/images/content/vscode/vscode-testpane.png +0 -0
  111. package/docs/images/template/dark.png +0 -0
  112. package/docs/images/template/icon.png +0 -0
  113. package/docs/images/template/light.png +0 -0
  114. package/docs/snippets/calendar-link.mdx +0 -4
  115. package/docs/snippets/gitignore-warning.mdx +0 -7
  116. package/docs/snippets/lifecycle-warning.mdx +0 -6
  117. package/docs/snippets/test-prereqs.mdx +0 -12
  118. package/docs/snippets/tests/assert-replay.mdx +0 -7
  119. package/docs/snippets/tests/assert-yaml.mdx +0 -8
  120. package/docs/snippets/tests/exec-js-replay.mdx +0 -7
  121. package/docs/snippets/tests/exec-js-yaml.mdx +0 -32
  122. package/docs/snippets/tests/exec-shell-replay.mdx +0 -7
  123. package/docs/snippets/tests/exec-shell-yaml.mdx +0 -15
  124. package/docs/snippets/tests/hover-image-replay.mdx +0 -7
  125. package/docs/snippets/tests/hover-image-yaml.mdx +0 -17
  126. package/docs/snippets/tests/hover-text-replay.mdx +0 -7
  127. package/docs/snippets/tests/hover-text-with-description-replay.mdx +0 -7
  128. package/docs/snippets/tests/hover-text-with-description-yaml.mdx +0 -24
  129. package/docs/snippets/tests/hover-text-yaml.mdx +0 -14
  130. package/docs/snippets/tests/match-image-replay.mdx +0 -7
  131. package/docs/snippets/tests/match-image-yaml.mdx +0 -17
  132. package/docs/snippets/tests/press-keys-replay.mdx +0 -7
  133. package/docs/snippets/tests/press-keys-yaml.mdx +0 -36
  134. package/docs/snippets/tests/remember-replay.mdx +0 -7
  135. package/docs/snippets/tests/remember-yaml.mdx +0 -28
  136. package/docs/snippets/tests/scroll-replay.mdx +0 -7
  137. package/docs/snippets/tests/scroll-until-image-replay.mdx +0 -7
  138. package/docs/snippets/tests/scroll-until-image-yaml.mdx +0 -14
  139. package/docs/snippets/tests/scroll-until-text-replay.mdx +0 -7
  140. package/docs/snippets/tests/scroll-until-text-yaml.mdx +0 -17
  141. package/docs/snippets/tests/scroll-yaml.mdx +0 -30
  142. package/docs/snippets/tests/type-repeated-replay.mdx +0 -7
  143. package/docs/snippets/tests/type-repeated-yaml.mdx +0 -22
  144. package/docs/snippets/tests/type-replay.mdx +0 -7
  145. package/docs/snippets/tests/type-yaml.mdx +0 -28
  146. package/docs/snippets/tests/wait-for-image-replay.mdx +0 -7
  147. package/docs/snippets/tests/wait-for-image-yaml.mdx +0 -18
  148. package/docs/snippets/tests/wait-for-text-replay.mdx +0 -7
  149. package/docs/snippets/tests/wait-for-text-yaml.mdx +0 -18
  150. package/docs/snippets/tests/wait-replay.mdx +0 -7
  151. package/docs/snippets/tests/wait-yaml.mdx +0 -13
  152. package/docs/styles.css +0 -65
  153. package/docs/v6/account/dashboard.mdx +0 -16
  154. package/docs/v6/account/enterprise.mdx +0 -110
  155. package/docs/v6/account/pricing.mdx +0 -33
  156. package/docs/v6/account/projects.mdx +0 -33
  157. package/docs/v6/account/team.mdx +0 -35
  158. package/docs/v6/action/ami.mdx +0 -109
  159. package/docs/v6/action/performance.mdx +0 -105
  160. package/docs/v6/action/secrets.mdx +0 -93
  161. package/docs/v6/apps/chrome-extensions.mdx +0 -48
  162. package/docs/v6/apps/desktop-apps.mdx +0 -93
  163. package/docs/v6/apps/mobile-apps.mdx +0 -26
  164. package/docs/v6/apps/static-websites.mdx +0 -54
  165. package/docs/v6/apps/tauri-apps.mdx +0 -361
  166. package/docs/v6/bugs/jira.mdx +0 -232
  167. package/docs/v6/cli/overview.mdx +0 -66
  168. package/docs/v6/commands/assert.mdx +0 -45
  169. package/docs/v6/commands/exec.mdx +0 -282
  170. package/docs/v6/commands/focus-application.mdx +0 -44
  171. package/docs/v6/commands/hover-image.mdx +0 -69
  172. package/docs/v6/commands/hover-text.mdx +0 -47
  173. package/docs/v6/commands/if.mdx +0 -53
  174. package/docs/v6/commands/match-image.mdx +0 -67
  175. package/docs/v6/commands/press-keys.mdx +0 -87
  176. package/docs/v6/commands/remember.mdx +0 -49
  177. package/docs/v6/commands/run.mdx +0 -44
  178. package/docs/v6/commands/scroll-until-image.mdx +0 -66
  179. package/docs/v6/commands/scroll-until-text.mdx +0 -60
  180. package/docs/v6/commands/scroll.mdx +0 -69
  181. package/docs/v6/commands/type.mdx +0 -45
  182. package/docs/v6/commands/wait-for-image.mdx +0 -54
  183. package/docs/v6/commands/wait-for-text.mdx +0 -48
  184. package/docs/v6/commands/wait.mdx +0 -45
  185. package/docs/v6/exporting/junit.mdx +0 -218
  186. package/docs/v6/exporting/playwright.mdx +0 -197
  187. package/docs/v6/features/auto-healing.mdx +0 -144
  188. package/docs/v6/features/generation.mdx +0 -116
  189. package/docs/v6/features/parallel-testing.mdx +0 -151
  190. package/docs/v6/features/reusable-snippets.mdx +0 -131
  191. package/docs/v6/features/selectorless.mdx +0 -80
  192. package/docs/v6/features/visual-assertions.mdx +0 -139
  193. package/docs/v6/getting-started/ci.mdx +0 -146
  194. package/docs/v6/getting-started/cli.mdx +0 -91
  195. package/docs/v6/getting-started/editing.mdx +0 -100
  196. package/docs/v6/getting-started/playwright.mdx +0 -342
  197. package/docs/v6/getting-started/running.mdx +0 -48
  198. package/docs/v6/getting-started/self-hosting.mdx +0 -408
  199. package/docs/v6/getting-started/vscode.mdx +0 -89
  200. package/docs/v6/guide/assertions.mdx +0 -189
  201. package/docs/v6/guide/authentication.mdx +0 -136
  202. package/docs/v6/guide/code.mdx +0 -65
  203. package/docs/v6/guide/dashcam.mdx +0 -118
  204. package/docs/v6/guide/environment-variables.mdx +0 -26
  205. package/docs/v6/guide/lifecycle.mdx +0 -242
  206. package/docs/v6/guide/locating.mdx +0 -141
  207. package/docs/v6/guide/protips.mdx +0 -43
  208. package/docs/v6/guide/variables.mdx +0 -143
  209. package/docs/v6/guide/waiting.mdx +0 -130
  210. package/docs/v6/importing/csv.mdx +0 -196
  211. package/docs/v6/importing/gherkin.mdx +0 -143
  212. package/docs/v6/importing/jira.mdx +0 -164
  213. package/docs/v6/importing/testrail.mdx +0 -162
  214. package/docs/v6/integrations/electron.mdx +0 -146
  215. package/docs/v6/integrations/netlify.mdx +0 -100
  216. package/docs/v6/integrations/vercel.mdx +0 -125
  217. package/docs/v6/interactive/explore.mdx +0 -99
  218. package/docs/v6/interactive/run.mdx +0 -52
  219. package/docs/v6/interactive/save.mdx +0 -63
  220. package/docs/v6/overview/comparison.mdx +0 -101
  221. package/docs/v6/overview/faq.mdx +0 -162
  222. package/docs/v6/overview/performance.mdx +0 -52
  223. package/docs/v6/overview/quickstart.mdx +0 -137
  224. package/docs/v6/overview/what-is-testdriver.mdx +0 -85
  225. package/docs/v6/scenarios/ai-chatbot.mdx +0 -28
  226. package/docs/v6/scenarios/cookie-banner.mdx +0 -32
  227. package/docs/v6/scenarios/file-upload.mdx +0 -33
  228. package/docs/v6/scenarios/form-filling.mdx +0 -32
  229. package/docs/v6/scenarios/log-in.mdx +0 -75
  230. package/docs/v6/scenarios/pdf-generation.mdx +0 -25
  231. package/docs/v6/scenarios/spell-check.mdx +0 -22
  232. package/docs/v6/security/action.mdx +0 -84
  233. package/docs/v6/security/agent.mdx +0 -73
  234. package/docs/v6/security/platform.mdx +0 -77
  235. package/docs/v6/tutorials/advanced-test.mdx +0 -81
  236. package/docs/v6/tutorials/basic-test.mdx +0 -45
  237. package/docs/v7/_drafts/agents.mdx +0 -852
  238. package/docs/v7/_drafts/architecture.mdx +0 -399
  239. package/docs/v7/_drafts/auto-cache-key.mdx +0 -167
  240. package/docs/v7/_drafts/awesome-logs-quick-ref.mdx +0 -100
  241. package/docs/v7/_drafts/best-practices.mdx +0 -486
  242. package/docs/v7/_drafts/caching-ai.mdx +0 -215
  243. package/docs/v7/_drafts/caching-selectors.mdx +0 -424
  244. package/docs/v7/_drafts/caching.mdx +0 -366
  245. package/docs/v7/_drafts/cli-to-sdk-migration.mdx +0 -425
  246. package/docs/v7/_drafts/commands/assert.mdx +0 -45
  247. package/docs/v7/_drafts/commands/exec.mdx +0 -282
  248. package/docs/v7/_drafts/commands/focus-application.mdx +0 -44
  249. package/docs/v7/_drafts/commands/hover-image.mdx +0 -69
  250. package/docs/v7/_drafts/commands/hover-text.mdx +0 -47
  251. package/docs/v7/_drafts/commands/if.mdx +0 -53
  252. package/docs/v7/_drafts/commands/match-image.mdx +0 -67
  253. package/docs/v7/_drafts/commands/press-keys.mdx +0 -87
  254. package/docs/v7/_drafts/commands/remember.mdx +0 -49
  255. package/docs/v7/_drafts/commands/run.mdx +0 -44
  256. package/docs/v7/_drafts/commands/scroll-until-image.mdx +0 -66
  257. package/docs/v7/_drafts/commands/scroll-until-text.mdx +0 -60
  258. package/docs/v7/_drafts/commands/scroll.mdx +0 -69
  259. package/docs/v7/_drafts/commands/type.mdx +0 -45
  260. package/docs/v7/_drafts/commands/wait-for-image.mdx +0 -54
  261. package/docs/v7/_drafts/commands/wait-for-text.mdx +0 -48
  262. package/docs/v7/_drafts/commands/wait.mdx +0 -45
  263. package/docs/v7/_drafts/configuration.mdx +0 -378
  264. package/docs/v7/_drafts/contributing.mdx +0 -174
  265. package/docs/v7/_drafts/core.mdx +0 -458
  266. package/docs/v7/_drafts/dashcam-title-feature.mdx +0 -89
  267. package/docs/v7/_drafts/debugging.mdx +0 -349
  268. package/docs/v7/_drafts/error-handling.mdx +0 -501
  269. package/docs/v7/_drafts/faq.mdx +0 -393
  270. package/docs/v7/_drafts/hooks.mdx +0 -360
  271. package/docs/v7/_drafts/init-command.mdx +0 -95
  272. package/docs/v7/_drafts/installation.mdx +0 -420
  273. package/docs/v7/_drafts/migration.mdx +0 -562
  274. package/docs/v7/_drafts/observable.mdx +0 -604
  275. package/docs/v7/_drafts/playwright.mdx +0 -342
  276. package/docs/v7/_drafts/plugin-migration.mdx +0 -220
  277. package/docs/v7/_drafts/powerful.mdx +0 -419
  278. package/docs/v7/_drafts/presets.mdx +0 -210
  279. package/docs/v7/_drafts/progressive-disclosure.mdx +0 -230
  280. package/docs/v7/_drafts/prompt-cache.mdx +0 -200
  281. package/docs/v7/_drafts/provision.mdx +0 -390
  282. package/docs/v7/_drafts/quick-start-test-recording.mdx +0 -214
  283. package/docs/v7/_drafts/readme.mdx +0 -135
  284. package/docs/v7/_drafts/reports.mdx +0 -414
  285. package/docs/v7/_drafts/scalable.mdx +0 -754
  286. package/docs/v7/_drafts/screenshot.mdx +0 -155
  287. package/docs/v7/_drafts/sdk-awesome-logs.mdx +0 -468
  288. package/docs/v7/_drafts/sdk-browser-rendering.mdx +0 -167
  289. package/docs/v7/_drafts/sdk-migration.mdx +0 -474
  290. package/docs/v7/_drafts/sdk-v7-complete.mdx +0 -345
  291. package/docs/v7/_drafts/self-hosting.mdx +0 -369
  292. package/docs/v7/_drafts/test-recording.mdx +0 -382
  293. package/docs/v7/_drafts/troubleshooting.mdx +0 -526
  294. package/docs/v7/_drafts/vitest-plugin.mdx +0 -477
  295. package/docs/v7/_drafts/vitest.mdx +0 -535
  296. package/docs/v7/_drafts/writing-tests.mdx +0 -25
  297. package/docs/v7/examples.mdx +0 -5
  298. package/eslint.config.js +0 -67
  299. package/examples/ai.test.mjs +0 -30
  300. package/examples/assert.test.mjs +0 -46
  301. package/examples/captcha-api.test.mjs +0 -50
  302. package/examples/chrome-extension.test.mjs +0 -94
  303. package/examples/drag-and-drop.test.mjs +0 -58
  304. package/examples/element-not-found.test.mjs +0 -26
  305. package/examples/exec-output.test.mjs +0 -59
  306. package/examples/exec-pwsh.test.mjs +0 -57
  307. package/examples/focus-window.test.mjs +0 -36
  308. package/examples/formatted-logging.test.mjs +0 -26
  309. package/examples/hover-image.test.mjs +0 -52
  310. package/examples/hover-text-with-description.test.mjs +0 -56
  311. package/examples/hover-text.test.mjs +0 -27
  312. package/examples/installer.test.mjs +0 -49
  313. package/examples/launch-vscode-linux.test.mjs +0 -54
  314. package/examples/match-image.test.mjs +0 -54
  315. package/examples/no-provision.test.mjs +0 -23
  316. package/examples/press-keys.test.mjs +0 -50
  317. package/examples/prompt.test.mjs +0 -33
  318. package/examples/scroll-keyboard.test.mjs +0 -37
  319. package/examples/scroll-until-image.test.mjs +0 -39
  320. package/examples/scroll-until-text.test.mjs +0 -67
  321. package/examples/scroll.test.mjs +0 -41
  322. package/examples/type.test.mjs +0 -45
  323. package/examples/windows-installer.test.mjs +0 -53
  324. package/interfaces/cli/commands/edit.js +0 -3
  325. package/interfaces/cli/commands/generate.js +0 -3
  326. package/interfaces/cli/commands/run.js +0 -3
  327. package/interfaces/cli/utils/factory.js +0 -71
  328. package/jsconfig.json +0 -26
  329. package/manual/test-init-command.js +0 -223
  330. package/sdk-log-formatter.js +0 -930
  331. package/setup/aws/cloudformation.yaml +0 -470
  332. package/setup/aws/spawn-runner.sh +0 -190
  333. package/test/api-resilience.test.mjs +0 -0
  334. package/test/captcha-solver.test.mjs +0 -70
  335. package/test/chrome-remote-debugging.test.mjs +0 -66
  336. package/test/manual/debug-locate-response.js +0 -82
  337. package/test/manual/reconnect-provision.test.mjs +0 -49
  338. package/test/manual/test-console-logs.test.mjs +0 -42
  339. package/test/manual/test-find-api.js +0 -73
  340. package/test/manual/test-init.sh +0 -54
  341. package/test/manual/test-prompt-cache.js +0 -96
  342. package/test/manual/test-provision-auth.mjs +0 -22
  343. package/test/manual/test-sandbox-render.js +0 -28
  344. package/test/manual/test-sdk-methods.js +0 -15
  345. package/test/manual/test-sdk-refactor.js +0 -53
  346. package/test/manual/test-stack-trace.mjs +0 -57
  347. package/test/manual/verify-element-api.js +0 -89
  348. package/test/manual/verify-types.js +0 -0
  349. package/test/manual-unawaited-promise.test.mjs +0 -31
  350. package/testdriver-plugin/skills/actions/SKILL.md +0 -93
  351. package/testdriver-plugin/skills/assertions/SKILL.md +0 -77
  352. package/testdriver-plugin/skills/caching/SKILL.md +0 -66
  353. package/testdriver-plugin/skills/creating-tests/SKILL.md +0 -104
  354. package/testdriver-plugin/skills/finding-elements/SKILL.md +0 -77
  355. package/testdriver-plugin/skills/github-actions/SKILL.md +0 -100
  356. package/testdriver-plugin/skills/running-tests/SKILL.md +0 -77
  357. package/testdriver-plugin/skills/secrets/SKILL.md +0 -87
  358. package/testdriver-plugin/skills/self-hosting/SKILL.md +0 -89
  359. package/testdriver-plugin/skills/setup/SKILL.md +0 -76
  360. package/testdriver-plugin/skills/variables/SKILL.md +0 -88
  361. package/testdriver-plugin/skills/waiting/SKILL.md +0 -72
  362. package/vitest.config.mjs +0 -29
@@ -1,77 +0,0 @@
1
- ---
2
- name: running-tests
3
- description: Run TestDriver tests. Use when executing tests with vitest, debugging test failures, or understanding test output.
4
- ---
5
-
6
- # Running Tests
7
-
8
- Read: `node_modules/testdriverai/docs/v7/running-tests.mdx`
9
-
10
- ## Basic Commands
11
-
12
- ```bash
13
- # Run all tests
14
- npx vitest run
15
-
16
- # Run specific test file
17
- npx vitest run tests/login.test.mjs
18
-
19
- # Run tests matching pattern
20
- npx vitest run tests/*.test.mjs
21
-
22
- # Watch mode (re-runs on file changes)
23
- npx vitest
24
- ```
25
-
26
- ## Environment Variables
27
-
28
- ```bash
29
- # Required
30
- TD_API_KEY=your_api_key
31
-
32
- # Optional: Run on Windows instead of Linux
33
- TD_OS=windows
34
-
35
- # Optional: AWS config for self-hosted Windows
36
- AWS_REGION=us-east-2
37
- AMI_ID=ami-xxxxx
38
- AWS_LAUNCH_TEMPLATE_ID=lt-xxxxx
39
- ```
40
-
41
- ## Running with Options
42
-
43
- ```bash
44
- # Run specific test with Windows sandbox
45
- TD_OS=windows npx vitest run tests/example.test.mjs
46
-
47
- # Run with increased verbosity
48
- npx vitest run --reporter=verbose tests/example.test.mjs
49
- ```
50
-
51
- ## Test Output
52
-
53
- TestDriver generates:
54
- - **Console output**: Real-time test progress
55
- - **JUnit XML**: `test-report.junit.xml` for CI integration
56
- - **TestDriver dashboard**: View recordings at [console.testdriver.ai](https://console.testdriver.ai)
57
-
58
- ## Debugging Failures
59
-
60
- 1. **Check the recording** - View visual replay on TestDriver dashboard
61
- 2. **Log element info**:
62
- ```javascript
63
- const el = await testdriver.find("button");
64
- console.log("Found:", el.found(), el.confidence, el.text);
65
- ```
66
- 3. **Use the two-file workflow** - Iterate quickly with `reconnect: true`
67
-
68
- ## Two-File Workflow Reminder
69
-
70
- For development iteration:
71
- ```bash
72
- # Step 1: Run setup
73
- npx vitest run tests/setup.test.mjs
74
-
75
- # Step 2: Within 2 minutes, run experiment
76
- npx vitest run tests/experiment.test.mjs
77
- ```
@@ -1,87 +0,0 @@
1
- ---
2
- name: secrets
3
- description: Manage secrets in TestDriver tests. Use when handling passwords, API keys, or sensitive data securely in tests and CI/CD.
4
- ---
5
-
6
- # Managing Secrets
7
-
8
- Read: `node_modules/testdriverai/docs/v7/secrets.mdx`
9
-
10
- ## Local Development
11
-
12
- Use `.env` file (never commit to git):
13
-
14
- ```bash
15
- # .env
16
- TD_API_KEY=td_xxxxxxxxxxxxx
17
- TEST_PASSWORD=secretpassword123
18
- STRIPE_TEST_KEY=sk_test_xxxxx
19
- ```
20
-
21
- Add to `.gitignore`:
22
- ```
23
- .env
24
- .env.local
25
- ```
26
-
27
- ## Accessing Secrets
28
-
29
- ```javascript
30
- const password = process.env.TEST_PASSWORD;
31
-
32
- await testdriver.find("Password input").click();
33
- await testdriver.type(password);
34
- ```
35
-
36
- ## GitHub Actions Secrets
37
-
38
- Add secrets in repository settings (Settings → Secrets → Actions):
39
-
40
- ```yaml
41
- # .github/workflows/test.yml
42
- - name: Run tests
43
- env:
44
- TD_API_KEY: ${{ secrets.TD_API_KEY }}
45
- TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
46
- run: npx vitest run
47
- ```
48
-
49
- ## AWS Credentials (for Windows testing)
50
-
51
- Required secrets for self-hosted Windows sandboxes:
52
-
53
- ```yaml
54
- env:
55
- TD_API_KEY: ${{ secrets.TD_API_KEY }}
56
- TD_OS: windows
57
- AWS_REGION: ${{ secrets.AWS_REGION }}
58
- AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
59
- AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
60
- AMI_ID: ${{ secrets.AMI_ID }}
61
- AWS_LAUNCH_TEMPLATE_ID: ${{ secrets.AWS_LAUNCH_TEMPLATE_ID }}
62
- ```
63
-
64
- ## Best Practices
65
-
66
- 1. **Never hardcode secrets** in test files
67
- 2. **Use `.env.example`** to document required variables:
68
- ```bash
69
- # .env.example (commit this)
70
- TD_API_KEY=
71
- TEST_PASSWORD=
72
- ```
73
- 3. **Rotate secrets** if accidentally exposed
74
- 4. **Use different credentials** for test vs production
75
- 5. **Limit secret scope** - only expose what's needed
76
-
77
- ## Masking in Logs
78
-
79
- Secrets in environment variables are automatically masked in CI logs. Avoid logging them:
80
-
81
- ```javascript
82
- // ❌ Don't do this
83
- console.log("Password:", process.env.TEST_PASSWORD);
84
-
85
- // ✅ Do this
86
- console.log("Password: [REDACTED]");
87
- ```
@@ -1,89 +0,0 @@
1
- ---
2
- name: self-hosting
3
- description: Self-host TestDriver sandboxes. Use when running Windows tests on AWS, configuring custom AMIs, or setting up your own infrastructure.
4
- ---
5
-
6
- # Self-Hosting
7
-
8
- Read: `node_modules/testdriverai/docs/v7/self-hosted.mdx`
9
- Read: `node_modules/testdriverai/docs/v7/aws-setup.mdx`
10
-
11
- ## When to Self-Host
12
-
13
- - **Windows testing** - Required for Windows sandboxes
14
- - **Custom environments** - Special software or configurations
15
- - **Data compliance** - Keep tests in your own infrastructure
16
- - **Performance** - Reduce latency with regional instances
17
-
18
- ## AWS Setup for Windows
19
-
20
- ### Prerequisites
21
- 1. AWS account with EC2 access
22
- 2. TestDriver Windows AMI (contact support)
23
- 3. VPC with public subnet
24
-
25
- ### Required Environment Variables
26
-
27
- ```bash
28
- TD_API_KEY=your_api_key
29
- TD_OS=windows
30
- AWS_REGION=us-east-2
31
- AWS_ACCESS_KEY_ID=AKIA...
32
- AWS_SECRET_ACCESS_KEY=...
33
- AMI_ID=ami-0dd5fa241273a7d50
34
- AWS_LAUNCH_TEMPLATE_ID=lt-0ef9bf26a945fb442
35
- ```
36
-
37
- ### Launch Template Configuration
38
-
39
- Create an EC2 launch template with:
40
- - Instance type: `c5.xlarge` or larger
41
- - AMI: TestDriver Windows AMI
42
- - Security group: Allow RDP (3389) and TestDriver ports
43
- - IAM role: EC2 permissions for your use case
44
-
45
- ### Running Windows Tests
46
-
47
- ```bash
48
- TD_OS=windows npx vitest run tests/windows-app.test.mjs
49
- ```
50
-
51
- ## Test Configuration
52
-
53
- ```javascript
54
- const testdriver = TestDriver(context, {
55
- os: 'windows', // Use Windows sandbox
56
- });
57
-
58
- await testdriver.provision.chrome({ url: 'https://example.com' });
59
- // or
60
- await testdriver.provision.installer({
61
- url: 'https://example.com/app.msi',
62
- launch: true,
63
- });
64
- ```
65
-
66
- ## Windows-Specific Examples
67
-
68
- - `node_modules/testdriverai/examples/windows-installer.test.mjs`
69
- - `node_modules/testdriverai/examples/exec-pwsh.test.mjs`
70
-
71
- ## PowerShell Execution
72
-
73
- ```javascript
74
- // Run PowerShell commands on Windows
75
- const result = await testdriver.exec("pwsh", "Get-Date", 5000);
76
- const files = await testdriver.exec("pwsh", "Get-ChildItem C:\\", 5000);
77
- ```
78
-
79
- ## Troubleshooting
80
-
81
- **Instance not starting?**
82
- - Check AWS credentials and permissions
83
- - Verify launch template exists
84
- - Check AMI is available in your region
85
-
86
- **Connection timeout?**
87
- - Security group must allow inbound traffic
88
- - Instance needs public IP or NAT gateway
89
- - Check TestDriver agent is running on AMI
@@ -1,76 +0,0 @@
1
- ---
2
- name: setup
3
- description: Set up TestDriver in a project. Use when installing testdriverai, configuring vitest, setting up TD_API_KEY, or initializing a new test project.
4
- ---
5
-
6
- # Setting Up TestDriver
7
-
8
- Read the quickstart guide: `node_modules/testdriverai/docs/v7/quickstart.mdx`
9
-
10
- ## Requirements
11
-
12
- 1. **API Key** from [console.testdriver.ai/team](https://console.testdriver.ai/team)
13
- 2. **Node.js** and **Vitest**
14
-
15
- ## Setup Steps
16
-
17
- ### 1. Install TestDriver
18
-
19
- ```bash
20
- npm install testdriverai vitest dotenv --save-dev
21
- ```
22
-
23
- ### 2. Create `.env` file
24
-
25
- ```bash
26
- TD_API_KEY=your_api_key_here
27
- ```
28
-
29
- ### 3. Create `vitest.config.mjs`
30
-
31
- ```javascript
32
- import { config } from 'dotenv';
33
- import TestDriver from 'testdriverai/vitest';
34
- import { defineConfig } from 'vitest/config';
35
-
36
- config();
37
-
38
- const setupFiles = ['testdriverai/vitest/setup', 'testdriverai/vitest/setup-aws'];
39
-
40
- export default defineConfig({
41
- test: {
42
- testTimeout: 900000,
43
- hookTimeout: 900000,
44
- disableConsoleIntercept: true,
45
- maxConcurrency: 3,
46
- reporters: ['default', TestDriver(), ['junit', { outputFile: 'test-report.junit.xml' }]],
47
- setupFiles,
48
- },
49
- });
50
- ```
51
-
52
- ### 4. Add to `.gitignore`
53
-
54
- ```
55
- .env
56
- ```
57
-
58
- ## Verify Setup
59
-
60
- Create a test file `tests/example.test.mjs`:
61
-
62
- ```javascript
63
- import { describe, expect, it } from "vitest";
64
- import { TestDriver } from "testdriverai/lib/vitest/hooks.mjs";
65
-
66
- describe("Setup Test", () => {
67
- it("should load a page", async (context) => {
68
- const testdriver = TestDriver(context);
69
- await testdriver.provision.chrome({ url: 'https://example.com' });
70
- const result = await testdriver.assert("Example Domain heading is visible");
71
- expect(result).toBeTruthy();
72
- });
73
- });
74
- ```
75
-
76
- Run: `npx vitest run tests/example.test.mjs`
@@ -1,88 +0,0 @@
1
- ---
2
- name: variables
3
- description: Use variables in TestDriver tests. Use when parameterizing tests, using environment variables, or passing data between test steps.
4
- ---
5
-
6
- # Using Variables
7
-
8
- Read: `node_modules/testdriverai/docs/v7/variables.mdx`
9
-
10
- ## Environment Variables
11
-
12
- Access via `process.env`:
13
-
14
- ```javascript
15
- const username = process.env.TEST_USERNAME;
16
- const password = process.env.TEST_PASSWORD;
17
-
18
- await testdriver.find("Username input").click();
19
- await testdriver.type(username);
20
- ```
21
-
22
- ## .env File
23
-
24
- Create `.env` in project root:
25
-
26
- ```bash
27
- TD_API_KEY=your_api_key
28
- TEST_USERNAME=testuser@example.com
29
- TEST_PASSWORD=testpass123
30
- BASE_URL=https://staging.example.com
31
- ```
32
-
33
- Load with dotenv (already configured in vitest.config.mjs):
34
-
35
- ```javascript
36
- import { config } from 'dotenv';
37
- config();
38
- ```
39
-
40
- ## Parameterized Tests
41
-
42
- ```javascript
43
- const testCases = [
44
- { email: 'user1@test.com', expected: 'Welcome User 1' },
45
- { email: 'user2@test.com', expected: 'Welcome User 2' },
46
- ];
47
-
48
- describe("Login Tests", () => {
49
- testCases.forEach(({ email, expected }) => {
50
- it(`should login ${email}`, async (context) => {
51
- const testdriver = TestDriver(context);
52
- await testdriver.provision.chrome({ url: process.env.BASE_URL });
53
-
54
- await testdriver.find("Email input").click();
55
- await testdriver.type(email);
56
-
57
- const result = await testdriver.assert(`page shows '${expected}'`);
58
- expect(result).toBeTruthy();
59
- });
60
- });
61
- });
62
- ```
63
-
64
- ## Sharing Data Between Steps
65
-
66
- ```javascript
67
- it("should complete flow", async (context) => {
68
- const testdriver = TestDriver(context);
69
- await testdriver.provision.chrome({ url: 'https://example.com' });
70
-
71
- // Get data from page
72
- const orderId = await testdriver.exec("js",
73
- "return document.querySelector('.order-id').textContent",
74
- 5000
75
- );
76
-
77
- // Use in later assertions
78
- const result = await testdriver.assert(`Order ${orderId} is confirmed`);
79
- expect(result).toBeTruthy();
80
- });
81
- ```
82
-
83
- ## Dynamic URLs
84
-
85
- ```javascript
86
- const baseUrl = process.env.BASE_URL || 'https://localhost:3000';
87
- await testdriver.provision.chrome({ url: `${baseUrl}/login` });
88
- ```
@@ -1,72 +0,0 @@
1
- ---
2
- name: waiting
3
- description: Wait for elements in TestDriver tests. Use when polling for elements, waiting for page loads, handling loading states, or setting timeouts.
4
- ---
5
-
6
- # Waiting for Elements
7
-
8
- Read: `node_modules/testdriverai/docs/v7/waiting-for-elements.mdx`
9
-
10
- ## Polling with Timeout
11
-
12
- Use the `timeout` option to poll until an element is found:
13
-
14
- ```javascript
15
- // Retries every 5 seconds until found or timeout
16
- const element = await testdriver.find("Success message", { timeout: 30000 });
17
- ```
18
-
19
- ## Wait for Page Load
20
-
21
- ```javascript
22
- // Assert something visible after load
23
- await testdriver.assert("Page has finished loading");
24
-
25
- // Or check for specific content
26
- await testdriver.assert("Welcome message is visible");
27
- ```
28
-
29
- ## Wait via Assertion
30
-
31
- ```javascript
32
- // This will wait and retry until true or timeout
33
- const loaded = await testdriver.assert("The dashboard has fully loaded");
34
- expect(loaded).toBeTruthy();
35
- ```
36
-
37
- ## Wait via exec (JavaScript)
38
-
39
- ```javascript
40
- await testdriver.exec("js", `
41
- await new Promise(resolve => {
42
- const check = () => {
43
- if (document.querySelector('.loaded')) resolve();
44
- else setTimeout(check, 100);
45
- };
46
- check();
47
- });
48
- `, 10000);
49
- ```
50
-
51
- ## Common Patterns
52
-
53
- ### Wait for element to disappear
54
- ```javascript
55
- // Keep checking until loading spinner is gone
56
- let spinner = await testdriver.find("Loading spinner");
57
- while (spinner.found()) {
58
- await new Promise(r => setTimeout(r, 1000));
59
- spinner = await testdriver.find("Loading spinner");
60
- }
61
- ```
62
-
63
- ### Wait between actions
64
- ```javascript
65
- await button.click();
66
- await new Promise(r => setTimeout(r, 2000)); // Wait 2 seconds
67
- await testdriver.assert("Result is visible");
68
- ```
69
-
70
- ## Examples
71
-
72
- See `node_modules/testdriverai/docs/guide/best-practices-polling.mdx`
package/vitest.config.mjs DELETED
@@ -1,29 +0,0 @@
1
- import { config } from "dotenv";
2
- import TestDriver from "testdriverai/vitest";
3
- import { defineConfig } from "vitest/config";
4
-
5
- // Load .env file early so it's available to the reporter (runs in main process)
6
- // and to worker processes
7
- config();
8
-
9
- // Always include AWS setup - it will be a no-op unless TD_OS=windows
10
- const setupFiles = [
11
- "dotenv/config",
12
- "testdriverai/vitest/setup",
13
- "testdriverai/vitest/setup-aws",
14
- ];
15
-
16
- export default defineConfig({
17
- test: {
18
- testTimeout: 900000,
19
- hookTimeout: 900000,
20
- disableConsoleIntercept: true,
21
- maxConcurrency: 3,
22
- reporters: [
23
- "default",
24
- TestDriver(),
25
- ["junit", { outputFile: "test-report.junit.xml" }],
26
- ],
27
- setupFiles,
28
- },
29
- });