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.
Files changed (128) hide show
  1. package/agent.js +29 -39
  2. package/docs/account/dashboard.mdx +16 -0
  3. package/docs/account/enterprise.mdx +97 -0
  4. package/docs/account/pricing.mdx +26 -0
  5. package/docs/account/projects.mdx +27 -0
  6. package/docs/account/team.mdx +31 -0
  7. package/docs/action/browser.mdx +1 -1
  8. package/docs/action/os.mdx +1 -2
  9. package/docs/action/output.mdx +2 -2
  10. package/docs/action/performance.mdx +4 -0
  11. package/docs/action/prerun.mdx +57 -1
  12. package/docs/action/secrets.mdx +3 -3
  13. package/docs/action/setup.mdx +6 -6
  14. package/docs/apps/chrome-extensions.mdx +41 -0
  15. package/docs/apps/desktop-apps.mdx +87 -0
  16. package/docs/apps/mobile-apps.mdx +22 -0
  17. package/docs/apps/static-websites.mdx +54 -0
  18. package/docs/bugs/jira.mdx +35 -28
  19. package/docs/cli/overview.mdx +19 -13
  20. package/docs/commands/assert.mdx +2 -0
  21. package/docs/commands/exec.mdx +96 -0
  22. package/docs/commands/focus-application.mdx +2 -0
  23. package/docs/commands/hover-image.mdx +2 -0
  24. package/docs/commands/hover-text.mdx +2 -0
  25. package/docs/commands/if.mdx +3 -2
  26. package/docs/commands/issues.mdx +27 -0
  27. package/docs/commands/match-image.mdx +2 -0
  28. package/docs/commands/press-keys.mdx +9 -5
  29. package/docs/commands/run.mdx +2 -1
  30. package/docs/commands/scroll-until-image.mdx +3 -1
  31. package/docs/commands/scroll-until-text.mdx +2 -0
  32. package/docs/commands/scroll.mdx +3 -1
  33. package/docs/commands/type.mdx +3 -1
  34. package/docs/commands/wait-for-image.mdx +3 -1
  35. package/docs/commands/wait-for-text.mdx +3 -1
  36. package/docs/commands/wait.mdx +3 -1
  37. package/docs/docs.json +260 -146
  38. package/docs/exporting/playwright.mdx +33 -26
  39. package/docs/features/auto-healing.mdx +25 -20
  40. package/docs/features/cross-platform.mdx +9 -8
  41. package/docs/features/generation.mdx +4 -3
  42. package/docs/features/github.mdx +22 -18
  43. package/docs/features/parallel-testing.mdx +15 -11
  44. package/docs/features/reusable-snippets.mdx +18 -14
  45. package/docs/features/selectorless.mdx +8 -3
  46. package/docs/features/visual-assertions.mdx +9 -10
  47. package/docs/getting-started/ci.mdx +7 -8
  48. package/docs/getting-started/editing.mdx +2 -0
  49. package/docs/getting-started/generating.mdx +1 -1
  50. package/docs/getting-started/running.mdx +2 -2
  51. package/docs/getting-started/setup.mdx +5 -12
  52. package/docs/getting-started/vscode.mdx +67 -79
  53. package/docs/getting-started/writing.mdx +7 -5
  54. package/docs/guide/assertions.mdx +6 -6
  55. package/docs/guide/authentication.mdx +18 -14
  56. package/docs/guide/code.mdx +3 -3
  57. package/docs/guide/environment-variables.mdx +64 -0
  58. package/docs/guide/lifecycle.mdx +154 -0
  59. package/docs/guide/locating.mdx +9 -9
  60. package/docs/guide/variables.mdx +9 -6
  61. package/docs/guide/waiting.mdx +9 -8
  62. package/docs/images/content/account/newprojectsettings.png +0 -0
  63. package/docs/images/content/account/projectpage.png +0 -0
  64. package/docs/images/content/account/projectreplays.png +0 -0
  65. package/docs/images/content/account/team-manage.png +0 -0
  66. package/docs/images/content/account/teampage.png +0 -0
  67. package/docs/images/content/side-by-side.png +0 -0
  68. package/docs/images/content/vscode/vscode-agent-preview.png +0 -0
  69. package/docs/images/content/vscode/vscode-copilot-ask.png +0 -0
  70. package/docs/images/content/vscode/vscode-file-creation.png +0 -0
  71. package/docs/images/content/vscode/vscode-install.png +0 -0
  72. package/docs/images/content/vscode/vscode-overview.png +0 -0
  73. package/docs/images/content/vscode/vscode-setup-walkthrough.png +0 -0
  74. package/docs/images/content/vscode/vscode-stopchat.png +0 -0
  75. package/docs/images/content/vscode/vscode-stoptest.png +0 -0
  76. package/docs/images/content/vscode/vscode-tdservice.png +0 -0
  77. package/docs/images/content/vscode/vscode-test-output.png +0 -0
  78. package/docs/images/content/vscode/vscode-testhistory.png +0 -0
  79. package/docs/images/content/vscode/vscode-testpane-runtests.png +0 -0
  80. package/docs/images/content/vscode/vscode-testpane.png +0 -0
  81. package/docs/importing/csv.mdx +9 -6
  82. package/docs/importing/gherkin.mdx +12 -10
  83. package/docs/importing/jira.mdx +11 -9
  84. package/docs/importing/testrail.mdx +10 -8
  85. package/docs/integrations/electron.mdx +26 -19
  86. package/docs/integrations/netlify.mdx +25 -24
  87. package/docs/integrations/vercel.mdx +22 -20
  88. package/docs/interactive/assert.mdx +4 -1
  89. package/docs/interactive/dry.mdx +51 -0
  90. package/docs/interactive/explore.mdx +92 -0
  91. package/docs/interactive/generate.mdx +6 -3
  92. package/docs/interactive/run.mdx +3 -0
  93. package/docs/interactive/save.mdx +3 -0
  94. package/docs/interactive/undo.mdx +3 -0
  95. package/docs/overview/comparison.mdx +6 -2
  96. package/docs/overview/faq.mdx +2 -1
  97. package/docs/overview/quickstart.mdx +123 -65
  98. package/docs/overview/upgrading.mdx +82 -0
  99. package/docs/overview/what-is-testdriver.mdx +13 -5
  100. package/docs/quickstart.mdx +1 -1
  101. package/docs/scenarios/ai-chatbot.mdx +26 -0
  102. package/docs/scenarios/cookie-banner.mdx +30 -0
  103. package/docs/scenarios/file-upload.mdx +30 -0
  104. package/docs/scenarios/form-filling.mdx +28 -0
  105. package/docs/scenarios/log-in.mdx +68 -0
  106. package/docs/scenarios/pdf-generation.mdx +21 -0
  107. package/docs/scenarios/spell-check.mdx +21 -0
  108. package/docs/security/action.mdx +7 -3
  109. package/docs/security/agent.mdx +1 -1
  110. package/docs/security/platform.mdx +9 -1
  111. package/docs/snippets/calendar-link.mdx +1 -0
  112. package/docs/snippets/gitignore-warning.mdx +4 -0
  113. package/docs/snippets/test-prereqs.mdx +15 -0
  114. package/docs/tutorials/advanced-test.mdx +2 -0
  115. package/docs/tutorials/basic-test.mdx +8 -7
  116. package/lib/commands.js +40 -21
  117. package/lib/config.js +0 -1
  118. package/lib/logger.js +2 -2
  119. package/lib/parser.js +1 -0
  120. package/lib/sdk.js +32 -26
  121. package/package.json +2 -1
  122. package/schema.json +1 -4
  123. package/styles/config/vocabularies/Docs/accept.txt +15 -2
  124. package/styles/config/vocabularies/Docs/reject.txt +4 -0
  125. package/docs/30x30.mdx +0 -84
  126. package/docs/issues.mdx +0 -9
  127. package/docs/security/dashboard.mdx +0 -0
  128. package/testdriver/chrome.yaml +0 -102
package/lib/sdk.js CHANGED
@@ -9,7 +9,7 @@ const axios = require('axios');
9
9
 
10
10
  const { logger } = require('./logger');
11
11
 
12
- // let token = null;
12
+ let token = null;
13
13
 
14
14
  const outputError = async (error) => {
15
15
  logger.info(chalk.red(error.status), chalk.red(error.statusText));
@@ -62,29 +62,32 @@ const parseBody = async (response, body) => {
62
62
  };
63
63
 
64
64
  let auth = async () => {
65
- // data.apiKey = process.env.DASHCAM_API_KEY; @todo add-auth
66
65
 
67
- // if (!data.apiKey) {
68
- // logger.info(chalk.red('API key not found. Set DASHCAM_API_KEY in your environment.'));
69
- // process.exit(1);
70
- // }
71
-
72
- const url = [root, "auth/exchange-api-key"].join("/");
73
- const config = {
74
- method: "post",
75
- headers: {
76
- "Content-Type": "application/json",
77
- },
78
- // data
79
- };
80
-
81
- try {
82
- await axios(url, config);
83
- // token = res.data.token;
84
- } catch (error) {
85
- await outputError(error);
86
- process.exit(1);
66
+ if (config["TD_API_KEY"]) {
67
+
68
+ const url = [root, "auth/exchange-api-key"].join("/");
69
+ const c = {
70
+ method: "post",
71
+ headers: {
72
+ "Content-Type": "application/json",
73
+ },
74
+ data: {
75
+ apiKey: config["TD_API_KEY"],
76
+ version
77
+ }
78
+ };
79
+
80
+ try {
81
+ let res = await axios(url, c);
82
+
83
+ token = res.data.token;
84
+ return token;
85
+ } catch (error) {
86
+ await outputError(error);
87
+ process.exit(1);
88
+ }
87
89
  }
90
+
88
91
  };
89
92
 
90
93
  const req = async (path, data, onChunk) => {
@@ -101,12 +104,15 @@ const req = async (path, data, onChunk) => {
101
104
 
102
105
  const config = {
103
106
  method: "post",
104
- headers: { "Content-Type": "application/json" },
107
+ headers: {
108
+ "Content-Type": "application/json",
109
+ ...(token && { "Authorization": `Bearer ${token}` }) // Add the authorization bearer token only if token is set
110
+ },
105
111
  responseType: typeof onChunk === "function" ? "stream" : "json",
106
112
  data: {
107
- ...data,
108
- session: session.get(),
109
- stream: typeof onChunk === "function",
113
+ ...data,
114
+ session: session.get(),
115
+ stream: typeof onChunk === "function",
110
116
  },
111
117
  };
112
118
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "5.5.4",
3
+ "version": "5.5.6",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -12,6 +12,7 @@
12
12
  "debug": "DEV=true VERBOSE=true node index.js",
13
13
  "bundle": "node build.mjs",
14
14
  "test": "mocha test/*",
15
+ "docs-lint": "cd docs && vale **/*.mdx",
15
16
  "runall": "dotenv testdriverai run --config testdriver.config.yaml --path './testdriver/*.testdriver.yaml'"
16
17
  },
17
18
  "author": "",
package/schema.json CHANGED
@@ -572,10 +572,7 @@
572
572
  ]
573
573
  }
574
574
  }
575
- },
576
- "required": [
577
- "commands"
578
- ]
575
+ }
579
576
  }
580
577
  }
581
578
  },
@@ -1,6 +1,19 @@
1
1
  testdriverai
2
- npm
2
+ (?i)npm
3
3
  Sonoma
4
- Prerun
4
+ [Pp]rerun
5
5
  Protip
6
6
  Protips
7
+ VS Code
8
+ VSIX
9
+ OAuth[2]?
10
+ Dashcam
11
+ VM[s]?
12
+ [Cc]hatbot[s]?
13
+ [Ss]electorless
14
+ [Ww]alkthrough
15
+ [Ss]ignup
16
+ (?i)PDF
17
+ Vercel
18
+ Netlify
19
+ [Jj]ira
@@ -0,0 +1,4 @@
1
+ VSCode
2
+ testdriver
3
+ Testdriver
4
+ testdriver.ai
package/docs/30x30.mdx DELETED
@@ -1,84 +0,0 @@
1
- # 30x30 Promotion: 30 Tests in 30 Days Free!
2
-
3
- ## Overview
4
- We understand that QA coverage is critical and often needed immediately. That’s why we’re offering our **30x30 Promotion**: our team will build and deploy **30 custom tests in 30 days** for free during your trial! Unlike other QA services that take months and cost hundreds of thousands of dollars, TestDriver gets you up and running in just 30 days.
5
-
6
- This is a **limited-time offer**, so don’t miss your chance! [**Schedule an onboarding call now**](#).
7
-
8
- ---
9
-
10
- ## Pricing
11
- We’re confident you’ll love TestDriver, which is why we’re offering this risk-free trial. After the trial, plans start at just **$995/month**, which includes:
12
- - **12,000 runner minutes per month**: Enough to run your 30 tests **2–5 times per day**.
13
- - Full access to our enterprise test dashboards.
14
- - Seamless integration with GitHub Actions.
15
-
16
- For more details, see the [Promotion Details](#promotion-details) and [Contract Details](#contract-details).
17
-
18
- ---
19
-
20
- ## Why Choose TestDriver?
21
-
22
- ### Quickly Deploy AI QA Tests
23
- - Safeguard your most important user flows with AI-generated tests.
24
- - Increase your total coverage with minimal effort.
25
-
26
- ### Test Flows Never Possible Before
27
- - Our powerful computer-use agent can test desktop apps, Chrome extensions, mobile apps, and websites.
28
-
29
- ### Spend Less Time on Maintenance
30
- - TestDriver tests automatically repair themselves, reducing the time spent on maintenance.
31
-
32
- ---
33
-
34
- ## Promotion Details
35
- Here’s what’s included in the **30x30 Promotion**:
36
-
37
- - **Test Coverage**: Test any publicly available desktop app, Chrome extension, mobile app, or website.
38
- - **AI-Generated Tests**: Choose from **250 AI-generated tests** within the first 7 days.
39
- - **Daily Test Runs**: Run tests **3–5 times every day**.
40
- - **AI Quality Reports**: Receive detailed reports delivered directly to your email.
41
- - **Self-Healing Tests**: AI automatically fixes and maintains your tests.
42
- - **GitHub Integration**: Seamlessly integrate with GitHub Actions.
43
- - **Enterprise Dashboards**: Gain full access to our enterprise-grade test dashboards.
44
-
45
- For more details, see the [Contract Details](#contract-details).
46
-
47
- ---
48
-
49
- ## How Does It Work?
50
-
51
- 1. **Book an Onboarding Call**: Share the specific flows you want to test.
52
- 2. **Generate a Test Suite**: We’ll explore your app and generate hundreds of tests using our AI.
53
- 3. **Deploy Tests**: Your new tests will be deployed to our GitHub Actions.
54
- 4. **Custom Test Creation**: Our support team will work with you to create tests for any features TestDriver might have missed.
55
- 5. **Engineer Training**: We’ll train your engineers on best practices for creating and maintaining TestDriver tests.
56
-
57
- ---
58
-
59
- ## Onboarding Process
60
-
61
- | Service | Timeline | Description |
62
- |-----------------------|----------------|-----------------------------------------------------------------------------|
63
- | **Custom Onboarding** | First 7 Days | Get set up quickly with custom workflows and Prerun Scripts developed by the TestDriver team. |
64
- | **AI Test Generation**| First 7 Days | Instant coverage: We’ll generate hundreds of tests for you to choose from. |
65
- | **Custom Test Creation** | First 30 Days | Our team will create tests for any features TestDriver might have missed. |
66
- | **Training** | First 30 Days | Our support team will train your engineers on best practices. |
67
- | **Test Execution** | Recurring | Seamless deployment: Tests are executed on a schedule or via GitHub Actions.|
68
-
69
- ---
70
-
71
- ## Contract Details
72
-
73
- - **Free Trial**: Get 30 custom tests free during a 30-day trial when subscribing to the $995/month "30x30" plan.
74
- - **Ownership**: The tests are yours! You can modify, duplicate, or distribute them however you wish.
75
- - **Payment**: A payment method is required to begin the trial.
76
- - **Renewal**: The contract renews monthly.
77
- - **Cancellation**: Cancel anytime, for any reason.
78
- - **Credits**: Unused credits don't roll over and expire at the end of each month.
79
- - **Additional Usage**: Additional usage is billed at standard rates.
80
-
81
- ---
82
-
83
- ## Ready to Get Started?
84
- Don’t wait—this is a limited-time offer! [**Schedule your onboarding call now**](#) and let us help you achieve QA coverage in just 30 days.
package/docs/issues.mdx DELETED
@@ -1,9 +0,0 @@
1
- ---
2
- title: "Known Issues"
3
- ---
4
-
5
- # Image Description Matches
6
-
7
- # Text Substrings
8
-
9
- #
File without changes
@@ -1,102 +0,0 @@
1
- version: 4.2.29
2
- session: 680d09c63f8647e0819efd85
3
- steps:
4
- - prompt: go to the web address chromewebstore.google.com
5
- commands:
6
- - command: focus-application
7
- name: Google Chrome
8
- - command: hover-text
9
- text: Search extensions
10
- description: address bar in Google Chrome
11
- action: click
12
- - command: type
13
- text: chromewebstore.google.com
14
- - command: press-keys
15
- keys:
16
- - enter
17
- - prompt: find the extension called "YouTube DJ Effects" and install it
18
- commands:
19
- - command: focus-application
20
- name: Google Chrome
21
- - command: hover-text
22
- text: Search extensions and themes
23
- description: search bar in Chrome Web Store
24
- action: click
25
- - command: type
26
- text: YouTube DJ Effects
27
- - command: press-keys
28
- keys:
29
- - enter
30
- - command: scroll-until-text
31
- text: YouTube DJ Effects
32
- direction: down
33
- method: keyboard
34
- - command: hover-text
35
- text: YouTube DJ Effects
36
- description: extension name in search results
37
- action: click
38
- - command: hover-text
39
- text: Add to Chrome
40
- description: install button for the extension
41
- action: click
42
- - prompt: find the extension called "YouTube DJ Effects" and install it
43
- commands:
44
- - command: hover-text
45
- text: Add to Chrome
46
- description: install button for the YouTube DJ Effects extension
47
- action: click
48
- - prompt: find the extension called "YouTube DJ Effects" and install it
49
- commands:
50
- - command: hover-text
51
- text: YouTube DJ effects / EQ / Volume Booster / Bass Booster
52
- description: extension name in search results
53
- action: click
54
- - command: hover-text
55
- text: Add to Chrome
56
- description: install button for the extension
57
- action: click
58
- - prompt: find the extension called "YouTube DJ Effects" and install it
59
- commands:
60
- - command: hover-text
61
- text: Add extension
62
- description: confirmation button to add the extension
63
- action: click
64
- - prompt: focus chrome and open a new tab
65
- commands:
66
- - command: focus-application
67
- name: Google Chrome
68
- - command: press-keys
69
- keys:
70
- - command
71
- - t
72
- - prompt: >-
73
- click the image that looks like a puzzle piece at the top of chrome
74
- and 'pin' the new extension
75
- commands:
76
- - command: focus-application
77
- name: Google Chrome
78
- - command: hover-image
79
- description: puzzle piece icon in the Chrome toolbar
80
- action: click
81
- - command: hover-text
82
- text: YouTube DJ effects / EQ / Volume Booster / Bass Booster
83
- description: pin option for the YouTube DJ Effects extension
84
- action: click
85
- assert: the orange and black record icon appears in the Chrome toolbar
86
- - prompt: >-
87
- click the image that looks like a 'pin' the youtube dj effects extension to show in the chrome toolbar
88
- commands:
89
- - command: focus-application
90
- name: Google Chrome
91
- - command: hover-image
92
- description: pin icon inside the extension menu
93
- action: click
94
- - prompt: >-
95
- click the icon that looks like a record to open the Youtube DJ
96
- extension
97
- commands:
98
- - command: focus-application
99
- name: Google Chrome
100
- - command: hover-image
101
- description: record icon in the Chrome toolbar
102
- action: click