testdriverai 4.0.43 → 4.0.44
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/.github/workflows/format.yml +17 -0
- package/.github/workflows/npm-publish.yml +1 -1
- package/.prettierignore +2 -0
- package/.prettierrc +1 -0
- package/README.md +9 -10
- package/eslint.config.js +21 -0
- package/index.js +403 -394
- package/lib/analytics.js +8 -10
- package/lib/commander.js +120 -90
- package/lib/commands.js +259 -217
- package/lib/config.js +18 -18
- package/lib/focus-application.js +6 -14
- package/lib/generator.js +35 -35
- package/lib/history.js +10 -10
- package/lib/init.js +125 -120
- package/lib/keymap.js +114 -115
- package/lib/logger.js +42 -45
- package/lib/notify.js +1 -5
- package/lib/parser.js +28 -42
- package/lib/redraw.js +19 -23
- package/lib/sdk.js +46 -47
- package/lib/session.js +1 -1
- package/lib/speak.js +5 -7
- package/lib/subimage/index.js +9 -8
- package/lib/subimage/opencv.js +1 -0
- package/lib/system.js +38 -34
- package/lib/valid-version.js +10 -8
- package/package.json +7 -4
- package/postinstall.js +5 -5
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: Lint + Prettier
|
|
2
|
+
on: push
|
|
3
|
+
jobs:
|
|
4
|
+
lint:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
steps:
|
|
7
|
+
- uses: actions/checkout@v2
|
|
8
|
+
- name: Set up Node.js
|
|
9
|
+
uses: actions/setup-node@v2
|
|
10
|
+
with:
|
|
11
|
+
node-version: 20
|
|
12
|
+
- name: npm install
|
|
13
|
+
run: npm install --only=dev --ignore-scripts
|
|
14
|
+
- name: Run ESLint
|
|
15
|
+
run: npx eslint
|
|
16
|
+
- name: Run Prettier
|
|
17
|
+
run: npx prettier .
|
package/.prettierignore
ADDED
package/.prettierrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Next generation autonomous AI agent for end-to-end testing of web & desktop
|
|
|
6
6
|
|
|
7
7
|
[Docs](https://docs.testdriver.ai) | [Website](https://testdriver.ai) | [GitHub Action](https://github.com/marketplace/actions/testdriver-ai) | [Join our Discord](https://discord.gg/a8Cq739VWn)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
---
|
|
10
10
|
|
|
11
11
|
TestDriver isn't like any test framework you've used before. TestDriver uses AI vision along with mouse and keyboard emulation to control the entire desktop. It's more like a QA employee than a test framework. This kind of black-box testing has some major advantages:
|
|
12
12
|
|
|
@@ -23,7 +23,7 @@ https://github.com/user-attachments/assets/fba08020-a751-4d9e-9505-50db541fd38b
|
|
|
23
23
|
- Test any user flow on any website in any browser
|
|
24
24
|
- Clone, build, and test any desktop app
|
|
25
25
|
- Render multiple browser windows and popups like 3rd party auth
|
|
26
|
-
- Test `<canvas>`, `<iframe>`,
|
|
26
|
+
- Test `<canvas>`, `<iframe>`, and `<video>` tags with ease
|
|
27
27
|
- Use file selectors to upload files to the browser
|
|
28
28
|
- Test chrome extensions
|
|
29
29
|
- Test integrations between applications
|
|
@@ -33,7 +33,7 @@ Check out [the docs](https://docs.testdriver.ai/).
|
|
|
33
33
|
|
|
34
34
|
# Workflow
|
|
35
35
|
|
|
36
|
-
1. Tell TestDriver what to do in natural language on your local machine using `npm i testdriverai -g`
|
|
36
|
+
1. Tell TestDriver what to do in natural language on your local machine using `npm i testdriverai -g`
|
|
37
37
|
2. TestDriver looks at the screen and uses mouse and keyboard emulation to accomplish the goal
|
|
38
38
|
3. Run TestDriver tests on our test infrastructure
|
|
39
39
|
|
|
@@ -75,14 +75,14 @@ If you have multiple monitors, make sure you do this on your primary display.
|
|
|
75
75
|
|
|
76
76
|
## Instruct TestDriver
|
|
77
77
|
|
|
78
|
-
Now, just tell TestDriver what you want it to do. For now, stick with single commands like "click sign up" and "scroll down."
|
|
78
|
+
Now, just tell TestDriver what you want it to do. For now, stick with single commands like "click sign up" and "scroll down."
|
|
79
79
|
|
|
80
|
-
Later, try `/explore` to perform higher level objectives like "complete the onboarding."
|
|
80
|
+
Later, try `/explore` to perform higher level objectives like "complete the onboarding."
|
|
81
81
|
|
|
82
82
|
```yaml
|
|
83
83
|
> Click on sign up
|
|
84
84
|
TestDriver Generates a Test
|
|
85
|
-
TestDriver will look at your screen and generate a test script. TestDriver can see the screen, control the mouse, keyboard, and more!
|
|
85
|
+
TestDriver will look at your screen and generate a test script. TestDriver can see the screen, control the mouse, keyboard, and more!
|
|
86
86
|
TestDriver can only see your primary display!
|
|
87
87
|
To navigate to testdriver.ai, we need to focus on the
|
|
88
88
|
Google Chrome application, click on the search bar, type
|
|
@@ -130,19 +130,19 @@ Feel free to ask TestDriver to perform some more tasks. Every time you prompt Te
|
|
|
130
130
|
|
|
131
131
|
## Save the test
|
|
132
132
|
|
|
133
|
-
If everything worked perfectly, use the `/save` command to save the test script to the current file.
|
|
133
|
+
If everything worked perfectly, use the `/save` command to save the test script to the current file.
|
|
134
134
|
|
|
135
135
|
If something didn't work, you can use `/undo` to remove all of the test steps added since the last prompt.
|
|
136
136
|
|
|
137
137
|
## Test the test locally
|
|
138
138
|
|
|
139
|
-
Now it's time to make sure the test plan works before we deploy it. Use testdriver run to run the test file you just created with /save .
|
|
139
|
+
Now it's time to make sure the test plan works before we deploy it. Use testdriver run to run the test file you just created with /save .
|
|
140
140
|
|
|
141
141
|
```sh
|
|
142
142
|
testdriverai run testdriver/test.yml
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
Make sure to reset the test state!
|
|
145
|
+
Make sure to reset the test state!
|
|
146
146
|
|
|
147
147
|
## Deploy
|
|
148
148
|
|
|
@@ -155,4 +155,3 @@ gh pr create --web
|
|
|
155
155
|
```
|
|
156
156
|
|
|
157
157
|
Your test will run on every commit and the results will be posted as a Dashcam.io video within your GitHub summary! Learn more about deploying on CI [here](https://docs.testdriver.ai/continuous-integration/overview).
|
|
158
|
-
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const globals = require("globals");
|
|
2
|
+
const pluginJs = require("@eslint/js");
|
|
3
|
+
|
|
4
|
+
module.exports = [
|
|
5
|
+
pluginJs.configs.recommended,
|
|
6
|
+
{
|
|
7
|
+
files: ["**/*.js"],
|
|
8
|
+
languageOptions: {
|
|
9
|
+
sourceType: "commonjs",
|
|
10
|
+
globals: {
|
|
11
|
+
...globals.browser,
|
|
12
|
+
...globals.node,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
// this needs to be it's own object for some reason
|
|
18
|
+
// https://github.com/eslint/eslint/issues/17400
|
|
19
|
+
ignores: ["lib/subimage/opencv.js", "node_modules/**", ".git"],
|
|
20
|
+
},
|
|
21
|
+
];
|