testdriverai 5.5.5 → 5.5.7
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/init.js +1 -1
- package/lib/logger.js +2 -2
- package/lib/parser.js +1 -0
- package/lib/sdk.js +14 -13
- 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
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Vercel"
|
|
3
|
+
sidebarTitle: "Vercel"
|
|
4
|
+
description: "Integrate TestDriver with Vercel deployments using GitHub Actions."
|
|
5
|
+
icon: "triangle"
|
|
3
6
|
---
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
This guide explains how to integrate **TestDriver.ai** with **Vercel deployments** using the **GitHub Actions workflow**. By combining these tools, you can automatically test your Vercel preview deployments or production builds to ensure they meet your quality standards before merging or releasing.
|
|
8
|
+
This guide explains how to integrate **TestDriver** with **Vercel deployments** using the **GitHub Actions workflow**. By combining these tools, you can automatically test your Vercel preview deployments or production builds to ensure they meet your quality standards before merging or releasing.
|
|
8
9
|
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
## Workflow Overview
|
|
12
13
|
|
|
13
14
|
1. **Trigger Vercel Deployment**: Use Vercel's GitHub integration to deploy your application on every pull request or push to the main branch.
|
|
14
|
-
2. **Run Tests on the Deployment URL**: Use the TestDriver
|
|
15
|
+
2. **Run Tests on the Deployment URL**: Use the TestDriver GitHub Action to test the deployed application using the Vercel deployment URL.
|
|
15
16
|
3. **Report Results**: View test results in the GitHub Actions dashboard or as comments on the pull request.
|
|
16
17
|
|
|
17
18
|
---
|
|
@@ -19,19 +20,18 @@ This guide explains how to integrate **TestDriver.ai** with **Vercel deployments
|
|
|
19
20
|
## Prerequisites
|
|
20
21
|
|
|
21
22
|
1. **Vercel GitHub Integration**: Ensure your repository is connected to Vercel for automatic deployments.
|
|
22
|
-
2. **TestDriver
|
|
23
|
+
2. **TestDriver API Key**: Store your API key as a GitHub secret (e.g., `TD_API_KEY`).
|
|
23
24
|
3. **Vercel Deployment URL**: Use the `VERCEL_URL` environment variable provided by Vercel to access the deployment.
|
|
24
25
|
|
|
25
26
|
---
|
|
26
27
|
|
|
27
28
|
## GitHub Actions Workflow
|
|
28
29
|
|
|
29
|
-
Here
|
|
30
|
+
Here's a complete workflow to test Vercel deployments with TestDriver:
|
|
30
31
|
|
|
31
32
|
### Workflow File: `.github/workflows/test-vercel.yml`
|
|
32
|
-
|
|
33
33
|
```yaml
|
|
34
|
-
name: Test Vercel Deployment with TestDriver
|
|
34
|
+
name: Test Vercel Deployment with TestDriver
|
|
35
35
|
|
|
36
36
|
on:
|
|
37
37
|
pull_request:
|
|
@@ -59,10 +59,10 @@ jobs:
|
|
|
59
59
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
|
60
60
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
|
61
61
|
|
|
62
|
-
- name: Run Tests with TestDriver
|
|
62
|
+
- name: Run Tests with TestDriver
|
|
63
63
|
uses: testdriverai/action@main
|
|
64
64
|
with:
|
|
65
|
-
key: ${{ secrets.
|
|
65
|
+
key: ${{ secrets.TD_API_KEY }}
|
|
66
66
|
prompt: |
|
|
67
67
|
1. Open the deployment URL: ${{ steps.vercel.outputs.url }}
|
|
68
68
|
2. Verify the homepage loads correctly
|
|
@@ -101,14 +101,14 @@ The `amondnet/vercel-action` waits for the Vercel deployment to complete and ret
|
|
|
101
101
|
|
|
102
102
|
---
|
|
103
103
|
|
|
104
|
-
### 2. **Run Tests with TestDriver
|
|
105
|
-
The TestDriver
|
|
104
|
+
### 2. **Run Tests with TestDriver**
|
|
105
|
+
The TestDriver GitHub Action runs tests on the deployed application using the deployment URL. The `prompt` field specifies the test steps to execute.
|
|
106
106
|
|
|
107
107
|
```yaml
|
|
108
|
-
- name: Run Tests with TestDriver
|
|
108
|
+
- name: Run Tests with TestDriver
|
|
109
109
|
uses: testdriverai/action@main
|
|
110
110
|
with:
|
|
111
|
-
key: ${{ secrets.
|
|
111
|
+
key: ${{ secrets.TD_API_KEY }}
|
|
112
112
|
prompt: |
|
|
113
113
|
1. Open the deployment URL: ${{ steps.vercel.outputs.url }}
|
|
114
114
|
2. Verify the homepage loads correctly
|
|
@@ -125,9 +125,11 @@ The TestDriver.ai GitHub Action runs tests on the deployed application using the
|
|
|
125
125
|
|
|
126
126
|
---
|
|
127
127
|
|
|
128
|
-
## Example TestDriver
|
|
128
|
+
## Example TestDriver Prompt
|
|
129
129
|
|
|
130
|
-
The `prompt` field in the TestDriver
|
|
130
|
+
The `prompt` field in the TestDriver action specifies the steps to test the Vercel deployment. For example:
|
|
131
|
+
|
|
132
|
+
```yaml
|
|
131
133
|
prompt: |
|
|
132
134
|
1. Open the deployment URL: ${{ steps.vercel.outputs.url }}
|
|
133
135
|
2. Verify the homepage loads correctly
|
|
@@ -143,7 +145,7 @@ prompt: |
|
|
|
143
145
|
## Secrets Configuration
|
|
144
146
|
|
|
145
147
|
Add the following secrets to your GitHub repository:
|
|
146
|
-
1. **`
|
|
148
|
+
1. **`TD_API_KEY`**: Your TestDriver API key.
|
|
147
149
|
2. **`VERCEL_TOKEN`**: Your Vercel API token.
|
|
148
150
|
3. **`VERCEL_ORG_ID`**: Your Vercel organization ID.
|
|
149
151
|
4. **`VERCEL_PROJECT_ID`**: Your Vercel project ID.
|
|
@@ -155,7 +157,7 @@ Add the following secrets to your GitHub repository:
|
|
|
155
157
|
1. **Automated Deployment Testing**: Automatically test every Vercel deployment, including preview and production builds.
|
|
156
158
|
2. **Early Issue Detection**: Catch issues in pull requests before merging.
|
|
157
159
|
3. **Detailed Feedback**: View test results directly in the GitHub Actions dashboard.
|
|
158
|
-
4. **Seamless Integration**: Combine Vercel's deployment capabilities with TestDriver
|
|
160
|
+
4. **Seamless Integration**: Combine Vercel's deployment capabilities with TestDriver's testing power.
|
|
159
161
|
|
|
160
162
|
---
|
|
161
163
|
|
|
@@ -165,7 +167,7 @@ Add the following secrets to your GitHub repository:
|
|
|
165
167
|
- ✅ **Test Vercel Deployment**: All tests passed.
|
|
166
168
|
- ❌ **Test Vercel Deployment**: 1 test failed. View logs for details.
|
|
167
169
|
|
|
168
|
-
### TestDriver
|
|
170
|
+
### TestDriver Logs:
|
|
169
171
|
- **Step 1**: Opened the deployment URL.
|
|
170
172
|
- **Step 2**: Verified the homepage loaded correctly.
|
|
171
173
|
- **Step 3**: Clicked the "Sign Up" button.
|
|
@@ -174,4 +176,4 @@ Add the following secrets to your GitHub repository:
|
|
|
174
176
|
|
|
175
177
|
---
|
|
176
178
|
|
|
177
|
-
By integrating TestDriver
|
|
179
|
+
By integrating TestDriver with Vercel deployments, you can ensure that every deployment is thoroughly tested, reducing the risk of bugs reaching production and improving the overall quality of your application.
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "/assert"
|
|
3
|
+
sidebarTitle: "/assert"
|
|
4
|
+
description: "Use the /assert command to ensure specific conditions are met in your tests."
|
|
5
|
+
icon: "clipboard-check"
|
|
3
6
|
---
|
|
4
7
|
|
|
5
8
|
# Command: `/assert`
|
|
@@ -14,7 +17,7 @@ The `/assert` command ensures that a specific condition is true within your test
|
|
|
14
17
|
|
|
15
18
|
## Behavior
|
|
16
19
|
- The `/assert` command generates an assertion based on the specified criteria.
|
|
17
|
-
- TestDriver
|
|
20
|
+
- TestDriver takes a screenshot and uses it to verify that the condition described in the `expect` field is true.
|
|
18
21
|
- If the condition isn't met, the test will fail and exit immediately.
|
|
19
22
|
|
|
20
23
|
## Example Usage
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "/dry"
|
|
3
|
+
sidebarTitle: "/dry"
|
|
4
|
+
description: "See and write a test plan without running the commands."
|
|
5
|
+
icon: "forward-step"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
The `/dry` command is used to create a test plan and write to a specified file. This command won't run steps it creates. It's a **dry** run.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
```bash
|
|
13
|
+
/dry <file>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Example Usage
|
|
17
|
+
```bash
|
|
18
|
+
testdriverai <filename.yaml>
|
|
19
|
+
> /dry click the 'log in' button
|
|
20
|
+
```
|
|
21
|
+
This command generates the steps to `click the 'log in' button` with an explanation and adds them to the current test plan, without executing any command.
|
|
22
|
+
|
|
23
|
+
## Behavior
|
|
24
|
+
- TestDriver will create steps for the test plan, writing them in the file.
|
|
25
|
+
- TestDriver will also show the reasoning and test steps in the CLI:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
thinking...
|
|
29
|
+
|
|
30
|
+
To click the 'log in' button, we need to identify and
|
|
31
|
+
click on the text "Log in" visible in the screenshot.
|
|
32
|
+
Here's how to accomplish this:
|
|
33
|
+
|
|
34
|
+
commands:
|
|
35
|
+
- command: hover-text
|
|
36
|
+
text: Log in
|
|
37
|
+
description: log in button in the code editor
|
|
38
|
+
action: click
|
|
39
|
+
|
|
40
|
+
### Explanation:
|
|
41
|
+
|
|
42
|
+
1. Click the 'Log in' Button: We use hover-text to locate and click on the "Log in" text visible in the code editor. This ensures the button is activated.
|
|
43
|
+
```
|
|
44
|
+
## Protips
|
|
45
|
+
- Ensure you run the `testdriverai` command with a valid file path before using `/dry`.
|
|
46
|
+
- Use descriptive filenames for your test plans to make them easier to identify.
|
|
47
|
+
- Combine `/dry` with `/undo` to write test plans without executing them.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## Notes
|
|
51
|
+
- The `/dry` command is ideal for writing out a series of steps before executing.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "/explore"
|
|
3
|
+
sidebarTitle: "/explore"
|
|
4
|
+
description: "Create and execute a test plan"
|
|
5
|
+
icon: "play-pause"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
|
|
10
|
+
The `/explore` command is used to execute a single step in a test plan and add it to a specified file. This command generates and performs steps in an interactive way while creating a test plan.
|
|
11
|
+
|
|
12
|
+
<Tip>`/explore` is the default command sent to TestDriver when no command is provided.</Tip>
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
```bash
|
|
16
|
+
testdriverai <filename.yaml>
|
|
17
|
+
/run prompt
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Example Usage
|
|
21
|
+
```bash
|
|
22
|
+
> /explore add an item to the shopping cart
|
|
23
|
+
```
|
|
24
|
+
This command creates the command step(s) necessary to add an item to the shopping cart in the specified test plan, executing the generated command(s) after writing them into the test plan. If there are intermediate steps to be taken, they are added to the test plan as well.
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
thinking...
|
|
28
|
+
|
|
29
|
+
To add an item to the shopping cart, we need to identify
|
|
30
|
+
the "Add to Cart" button from the screenshot. However,
|
|
31
|
+
since the screenshot shows a code editor, we need to
|
|
32
|
+
assume the button is not visible here. Let's proceed with
|
|
33
|
+
a generic approach:
|
|
34
|
+
|
|
35
|
+
commands:
|
|
36
|
+
- command: focus-application
|
|
37
|
+
name: Google Chrome
|
|
38
|
+
- command: hover-text
|
|
39
|
+
text: Add to Cart
|
|
40
|
+
description: add to cart button on the shopping page
|
|
41
|
+
action: click
|
|
42
|
+
|
|
43
|
+
### Explanation:
|
|
44
|
+
|
|
45
|
+
1. Focus Google Chrome: Ensure the browser is active to interact with the shopping page.
|
|
46
|
+
2. Click 'Add to Cart': Use hover-text to find and click the "Add to Cart" button, assuming it's present on the shopping page.
|
|
47
|
+
|
|
48
|
+
command='focus-application' name='Google Chrome'
|
|
49
|
+
command='hover-text' text='Add to Cart' description='add to cart button on the shopping page' action='click'
|
|
50
|
+
|
|
51
|
+
thinking...
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
In this case, the user wasn't logged in, so the AI will 'undo' the steps it thought it should take, and add steps to log in first.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
undoing...
|
|
58
|
+
thinking...
|
|
59
|
+
|
|
60
|
+
The screenshot shows a "Sign In" button on the webpage.
|
|
61
|
+
Let's try clicking that instead, as it might be necessary
|
|
62
|
+
before adding items to the cart.
|
|
63
|
+
|
|
64
|
+
commands:
|
|
65
|
+
- command: hover-text
|
|
66
|
+
text: Sign In
|
|
67
|
+
description: sign in button on the webpage
|
|
68
|
+
action: click
|
|
69
|
+
|
|
70
|
+
command='hover-text' text='Sign In' description='sign in button on the webpage' action='click'
|
|
71
|
+
|
|
72
|
+
thinking...
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## Behavior
|
|
77
|
+
- TestDriver will generate an idea to complete the task, try to execute it, and add the steps to the test plan.
|
|
78
|
+
- The steps will be executed in the order generated.
|
|
79
|
+
- If the steps are successful, they are added to the test plan file.
|
|
80
|
+
- If the steps fail, TestDriver will attempt to fall back to AI, undo the last step and provide an explanation of what went wrong. The AI will retry the step with new commands.
|
|
81
|
+
- If the commands are successful, the program will output the results and exit with code `0`.
|
|
82
|
+
- If any failures occur during the test, the program will output the errors and exit with code `1`.
|
|
83
|
+
|
|
84
|
+
## Protips
|
|
85
|
+
- Use descriptive prompts for higher success with generating test steps with `/explore`.
|
|
86
|
+
- Use `/explore` multiple times in succession to build a comprehensive test plan.
|
|
87
|
+
|
|
88
|
+
## Gotchas
|
|
89
|
+
- The AI will retry 3 times if it can't complete the task.
|
|
90
|
+
|
|
91
|
+
## Notes
|
|
92
|
+
- The `/explore` command is ideal for creating test plans in an interactive session.
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "/generate"
|
|
3
|
+
sidebarTitle: "/generate"
|
|
4
|
+
description: "Use the /generate command to create exploratory test cases automatically."
|
|
5
|
+
icon: "wand-sparkles"
|
|
3
6
|
---
|
|
4
7
|
|
|
5
8
|
# Command: `/generate`
|
|
6
9
|
|
|
7
10
|
## Description
|
|
8
|
-
The `/generate` command is an experimental feature that instructs TestDriver
|
|
11
|
+
The `/generate` command is an experimental feature that instructs TestDriver to create its own exploratory prompts. This command is used in the "Generate a Test Suite" demo and is designed to help automate the creation of exploratory test cases.
|
|
9
12
|
|
|
10
13
|
## Usage
|
|
11
14
|
```bash
|
|
@@ -15,11 +18,11 @@ The `/generate` command is an experimental feature that instructs TestDriver.ai
|
|
|
15
18
|
## Behavior
|
|
16
19
|
- The `/generate` command analyzes the display and generates exploratory prompts for testing.
|
|
17
20
|
- Each exploratory test is saved as a simple Markdown file containing a list of steps.
|
|
18
|
-
- TestDriver
|
|
21
|
+
- TestDriver generates 10 Markdown files every time the `/generate` command is called.
|
|
19
22
|
- The generated files are stored in the `./testdriver/generate/*.md` directory.
|
|
20
23
|
|
|
21
24
|
## Example Output
|
|
22
|
-
Here
|
|
25
|
+
Here's an example of a generated test file (`test-search-function.md`):
|
|
23
26
|
```markdown
|
|
24
27
|
1. Click on the search icon.
|
|
25
28
|
2. Type "real-time chat" into the search bar.
|
package/docs/interactive/run.mdx
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
|
|
2
|
+
title: Comparison
|
|
3
|
+
sidebarTitle: "Comparison"
|
|
4
|
+
description: "TestDriver vs Playwright vs Selenium"
|
|
5
|
+
icon: boxing-glove
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
### Application Support
|
|
@@ -84,3 +86,5 @@ TestDriver currently supports Mac and Windows!
|
|
|
84
86
|
| Windows | ✅ | ✅ | ✅ |
|
|
85
87
|
| Mac | ✅ | ✅ | ✅ |
|
|
86
88
|
| Linux | | ✅ | ✅ |
|
|
89
|
+
|
|
90
|
+
<Tip>You **can** use TestDriver on Linux with hosted runners, but not locally yet.</Tip>
|
package/docs/overview/faq.mdx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "FAQ"
|
|
3
3
|
sidebarTitle: "FAQ"
|
|
4
|
+
description: "Frequently Asked Questions about TestDriver"
|
|
4
5
|
icon: "block-question"
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -117,7 +118,7 @@ Yes. You can rewrite prompts, add constraints, or review and tweak auto-generate
|
|
|
117
118
|
Yes. You can inspect the resolved steps, see element matches, and adjust test flows before execution.
|
|
118
119
|
|
|
119
120
|
## Can I use TestDriver to test new features?
|
|
120
|
-
Yes. It
|
|
121
|
+
Yes. It's great for validating changes, ensuring no regressions, and verifying rollout configurations.
|
|
121
122
|
|
|
122
123
|
## Can it test seasonal or time-based behaviors?
|
|
123
124
|
Yes. You can schedule tests or run them under specific date/time settings to verify time-sensitive logic.
|
|
@@ -1,76 +1,134 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Quickstart"
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
sidebarTitle: "Quickstart"
|
|
4
|
+
description: "Get started with TestDriver in minutes."
|
|
5
|
+
icon: "gauge-high"
|
|
5
6
|
---
|
|
6
7
|
|
|
8
|
+
The fastest way to get started with TestDriver is to install the VS Code extension. This guide will walk you through the installation process and provide an overview of the extension's features.
|
|
9
|
+
|
|
7
10
|
<Card
|
|
8
|
-
title="
|
|
9
|
-
icon="
|
|
10
|
-
href="/
|
|
11
|
+
title="Download the VS Code Extension"
|
|
12
|
+
icon="download"
|
|
13
|
+
href="https://github.com/testdriverai/vscode/releases/latest/download/testdriver.vsix"
|
|
11
14
|
>
|
|
12
|
-
|
|
15
|
+
Get the latest version from GitHub releases.
|
|
13
16
|
</Card>
|
|
14
17
|
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
18
|
+
Don't use VS Code? <a href="/getting-started/setup">Get the TestDriver CLI →</a>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Install the extension
|
|
23
|
+
|
|
24
|
+
1. Open Visual Studio Code.
|
|
25
|
+
2. Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or by pressing `Ctrl+Shift+X`.
|
|
26
|
+
3. In the Extensions view, click on the three-dot menu in the top-right corner and select "Install from VSIX...".
|
|
27
|
+
4. Navigate to the location where you downloaded the `testdriverai.vsix` file and select it.
|
|
28
|
+
|
|
29
|
+
<Frame>
|
|
30
|
+
<img height="200" src="/images/content/vscode/vscode-install.png" />
|
|
31
|
+
</Frame>
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
# Try the Walkthrough
|
|
36
|
+
|
|
37
|
+
The extension should launch a walkthrough. If it doesn't, you can manually start it by running the command `TestDriver: Start Setup Walkthrough` from the Command Palette (`Ctrl+Shift+P`).
|
|
38
|
+
|
|
39
|
+
<Frame caption="Walkthrough">
|
|
40
|
+
<img height="200" src="/images/content/vscode/vscode-setup-walkthrough.png" />
|
|
41
|
+
</Frame>
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
# Overview
|
|
47
|
+
|
|
48
|
+
<Frame caption="VS Code Extension Overview">
|
|
49
|
+
<img height="400" src="/images/content/vscode/vscode-overview.png" />
|
|
50
|
+
</Frame>
|
|
51
|
+
|
|
52
|
+
### 1. Test Pane
|
|
53
|
+
- Located in the **Activity Bar** (left-hand side of the editor).
|
|
54
|
+
- Clicking the <Icon icon="flask-conical" iconType="solid" /> **flask icon** opens the TestDriver test explorer.
|
|
55
|
+
- Lists all the available YAML-based test definitions.
|
|
56
|
+
|
|
57
|
+
<Frame caption="The test pane is here">
|
|
58
|
+
<img height="100" src="/images/content/vscode/vscode-testpane.png" />
|
|
59
|
+
</Frame>
|
|
60
|
+
|
|
61
|
+
### 2. Run all Tests
|
|
62
|
+
- This button runs all tests shown in the Test Explorer.
|
|
63
|
+
- Found near the top of the Test Explorer view.
|
|
64
|
+
- Especially useful for quickly validating a batch of test cases.
|
|
65
|
+
|
|
66
|
+
<Frame caption="Gotta run 'em all">
|
|
67
|
+
<img height="200" src="/images/content/vscode/vscode-testpane-runtests.png" />
|
|
68
|
+
</Frame>
|
|
69
|
+
|
|
70
|
+
### 3. AI Test Creation
|
|
71
|
+
- New files created by TestDriver will automatically be focused in the editor.
|
|
72
|
+
- Defines an automated test script created by TestDriver.
|
|
73
|
+
|
|
74
|
+
<Frame caption="You will create a new file every time you start a chat">
|
|
75
|
+
<img height="200" src="/images/content/vscode/vscode-file-creation.png" />
|
|
76
|
+
</Frame>
|
|
77
|
+
|
|
78
|
+
### 4. AI Agent Test Preview
|
|
79
|
+
- Sidebar chat panel shows the TestDriver agent's response to the prompt.
|
|
80
|
+
- Offers feedback, interpretation, or suggested actions for the test steps.
|
|
81
|
+
- Example: It identifies the context (e.g., a terminal is in focus) and suggests the correct automation action.
|
|
82
|
+
- Additional files modified by the agent are listed for context.
|
|
83
|
+
|
|
84
|
+
<img width="300" src="/images/content/vscode/vscode-agent-preview.png" />
|
|
85
|
+
|
|
86
|
+
### 5. Test Output
|
|
87
|
+
- Terminal panel at the bottom of the screen.
|
|
88
|
+
- Displays live output from running the test file.
|
|
89
|
+
- Shows TestDriver version, current test script, and metadata like session ID.
|
|
90
|
+
- Helpful for debugging and understanding test execution flow.
|
|
91
|
+
|
|
92
|
+
<Frame caption="You can move the terminal panel to the right as well!">
|
|
93
|
+
<img height="200" src="/images/content/vscode/vscode-test-output.png" />
|
|
94
|
+
</Frame>
|
|
95
|
+
|
|
96
|
+
### 6. Test History
|
|
97
|
+
- Shows a list of previously run test scripts.
|
|
98
|
+
- Allows developers to review or re-run older tests.
|
|
99
|
+
- Useful for regression testing or comparing AI-generated test iterations.
|
|
100
|
+
|
|
101
|
+
<Frame caption="More history, less mystery">
|
|
102
|
+
<img src="/images/content/vscode/vscode-testhistory.png" />
|
|
103
|
+
</Frame>
|
|
73
104
|
|
|
74
105
|
---
|
|
75
106
|
|
|
76
|
-
|
|
107
|
+
## Troubleshooting
|
|
108
|
+
|
|
109
|
+
###ß I don't have GitHub Copilot Chat
|
|
110
|
+
|
|
111
|
+
You can still use the extension to run and manage tests. Use the CLI for test creation instead.
|
|
112
|
+
|
|
113
|
+
### The @testdriver command doesn't show up
|
|
114
|
+
|
|
115
|
+
Make sure the GitHub Copilot Chat is set to "ask."
|
|
116
|
+
|
|
117
|
+
<img src="/images/content/vscode/vscode-copilot-ask.png" />
|
|
118
|
+
|
|
119
|
+
### How do I stop a running execution?
|
|
120
|
+
|
|
121
|
+
Depending on the context, you can stop a running test execution in several ways:
|
|
122
|
+
|
|
123
|
+
### 1. Click on the "Stop" button in the bottom of agent chat.
|
|
124
|
+
|
|
125
|
+
<img height="200" src="/images/content/vscode/vscode-stopchat.png" />
|
|
126
|
+
|
|
127
|
+
### 2. Click on the "Stop" button in the top right corner of the test execution. This only shows on hover.
|
|
128
|
+
|
|
129
|
+
<img src="/images/content/vscode/vscode-stoptest.png" />
|
|
130
|
+
|
|
131
|
+
### 3. A TestDriver icon will show in the tray bar. Click it, then click "quit."
|
|
132
|
+
|
|
133
|
+
<img src="/images/content/vscode/vscode-tdservice.png" />
|
|
134
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Upgrading Existing Tests"
|
|
3
|
+
sidebarTitle: "Upgrading"
|
|
4
|
+
description: "Learn how to upgrade TestDriver for the latest features and improvements."
|
|
5
|
+
icon: "circle-up"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## How to Upgrade TestDriver
|
|
9
|
+
To upgrade TestDriver, follow these steps:
|
|
10
|
+
1. **Check for Updates**: Regularly check the [TestDriver NPM Package](https://www.npmjs.com/package/testdriverai)
|
|
11
|
+
2. **Update Command**: Use the following command to update TestDriver to the latest version:
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g testdriverai
|
|
14
|
+
```
|
|
15
|
+
If you want to use the beta version, use:
|
|
16
|
+
```bash
|
|
17
|
+
npm install -g testdriverai@beta
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
In your existing Github Action setup, you may need to update the `version` field in the `workflows/testdriver.yaml` file(s) to match the version of TestDriver you want to use. Leaving it blank will run `latest` by default. Here is an example of what to replace:
|
|
21
|
+
|
|
22
|
+
```yaml {16}
|
|
23
|
+
name: TestDriver.ai
|
|
24
|
+
|
|
25
|
+
on:
|
|
26
|
+
push:
|
|
27
|
+
branches: ["main"]
|
|
28
|
+
pull_request:
|
|
29
|
+
workflow_dispatch:
|
|
30
|
+
|
|
31
|
+
jobs:
|
|
32
|
+
test:
|
|
33
|
+
name: "TestDriver"
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
steps:
|
|
36
|
+
- uses: testdriverai/action@main
|
|
37
|
+
with:
|
|
38
|
+
version: "4.2.2"
|
|
39
|
+
key: ${{secrets.TD_API_KEY}}
|
|
40
|
+
prompt: |
|
|
41
|
+
1. /run testdriver/test.yaml
|
|
42
|
+
prerun: |
|
|
43
|
+
cd $env:TEMP
|
|
44
|
+
npm init -y
|
|
45
|
+
npm install dashcam-chrome
|
|
46
|
+
Start-Process "C:/Program Files/Google/Chrome/Application/chrome.exe" -ArgumentList "--start-maximized", "--load-extension=$(pwd)/node_modules/dashcam-chrome/build", "${{ env.WEBSITE_URL }}"
|
|
47
|
+
exit
|
|
48
|
+
env:
|
|
49
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
50
|
+
FORCE_COLOR: "3"
|
|
51
|
+
WEBSITE_URL: "https://orgfarm-abvxdff-dev-ed.develop.my.salesforce.com/" # Define the website URL here
|
|
52
|
+
TD_TEST_USERNAME: ${{secrets.TD_TEST_USERNAME}}
|
|
53
|
+
TD_TEST_PASSWORD: ${{secrets.TD_TEST_PASSWORD}}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Would become:
|
|
57
|
+
|
|
58
|
+
```yaml {16}
|
|
59
|
+
name: TestDriver.ai
|
|
60
|
+
|
|
61
|
+
on:
|
|
62
|
+
push:
|
|
63
|
+
branches: ["main"]
|
|
64
|
+
pull_request:
|
|
65
|
+
workflow_dispatch:
|
|
66
|
+
|
|
67
|
+
jobs:
|
|
68
|
+
test:
|
|
69
|
+
name: "TestDriver"
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
steps:
|
|
72
|
+
- uses: testdriverai/action@main
|
|
73
|
+
with:
|
|
74
|
+
version: "5.3.0"
|
|
75
|
+
key: ${{secrets.TESTDRIVER_API_KEY}}
|
|
76
|
+
prompt: |
|
|
77
|
+
1. /run testdriver/test.yaml
|
|
78
|
+
...
|
|
79
|
+
...
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Now existing tests will run on v5.3.0
|