testdriverai 5.0.6 → 5.0.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/README.md +18 -6
- package/agent.js +2 -2
- package/lib/commands.js +13 -1
- package/lib/config.js +1 -0
- package/lib/sandbox.js +4 -0
- package/package-lock.json +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,19 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
# TestDriver.ai
|
|
4
4
|
|
|
5
|
-
Automate and scale QA with
|
|
5
|
+
Automate and scale QA with computer-use agents.
|
|
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
|
+
|
|
12
|
+
|
|
13
|
+
https://github.com/user-attachments/assets/4719e834-652a-43ba-8b8c-24ea6f357ae3
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# Install via NPM
|
|
18
|
+
|
|
11
19
|
```sh
|
|
12
20
|
npm install testdriverai -g
|
|
13
21
|
```
|
|
14
22
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
# Run Init
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
testdriverai init
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
[Follow the instructions on our docs for more.](https://docs.testdriver.ai/overview/quickstart).
|
|
30
|
+
|
|
31
|
+
# About
|
|
18
32
|
|
|
19
33
|
TestDriver isn't like any test framework you've used before. TestDriver is an OS Agent for QA. 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:
|
|
20
34
|
|
|
@@ -24,8 +38,6 @@ TestDriver isn't like any test framework you've used before. TestDriver is an OS
|
|
|
24
38
|
|
|
25
39
|
### Demo
|
|
26
40
|
|
|
27
|
-
https://github.com/user-attachments/assets/fba08020-a751-4d9e-9505-50db541fd38b
|
|
28
|
-
|
|
29
41
|
# Examples
|
|
30
42
|
|
|
31
43
|
- Test any user flow on any website in any browser
|
package/agent.js
CHANGED
|
@@ -232,7 +232,7 @@ const dieOnFatal = async (error) => {
|
|
|
232
232
|
// and responds. notice `actOnMarkdown` which will continue
|
|
233
233
|
// the thread until there are no more codeblocks to execute
|
|
234
234
|
const haveAIResolveError = async (error, markdown, depth = 0, undo = true) => {
|
|
235
|
-
if (
|
|
235
|
+
if (error.fatal) {
|
|
236
236
|
return await dieOnFatal(error);
|
|
237
237
|
}
|
|
238
238
|
|
|
@@ -1183,7 +1183,7 @@ const makeSandbox = async () => {
|
|
|
1183
1183
|
logger.info(chalk.gray(`- creating linux sandbox...`));
|
|
1184
1184
|
await sandbox.boot();
|
|
1185
1185
|
logger.info(chalk.gray(`- authenticating...`));
|
|
1186
|
-
await sandbox.send({type: 'authenticate', apiKey: config.TD_API_KEY });
|
|
1186
|
+
await sandbox.send({type: 'authenticate', apiKey: config.TD_API_KEY, secret: config.TD_SECRET} );
|
|
1187
1187
|
logger.info(chalk.gray(`- setting up...`));
|
|
1188
1188
|
await sandbox.send({type: 'create', resolution: [1024, 768]});
|
|
1189
1189
|
logger.info(chalk.gray(`- starting stream...`));
|
package/lib/commands.js
CHANGED
|
@@ -707,7 +707,19 @@ let commands = {
|
|
|
707
707
|
exec: async (cli_command, use_stderr = false, silent = false) => {
|
|
708
708
|
|
|
709
709
|
if (config.TD_VM) {
|
|
710
|
-
|
|
710
|
+
let result = await sandbox.send({type: "commands.run", command: cli_command });
|
|
711
|
+
if (!silent) {
|
|
712
|
+
if (use_stderr) {
|
|
713
|
+
logger.info(chalk.dim(result.out.stderr), true);
|
|
714
|
+
} else {
|
|
715
|
+
logger.info(chalk.dim(result.out.stdout), true);
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
let rtnr = use_stderr ? result.out.stderr : result.out.stdout;
|
|
721
|
+
return rtnr;
|
|
722
|
+
|
|
711
723
|
} else {
|
|
712
724
|
|
|
713
725
|
let args = {};
|
package/lib/config.js
CHANGED
package/lib/sandbox.js
CHANGED
|
@@ -54,6 +54,10 @@ class Sandbox {
|
|
|
54
54
|
this.socket.on('message', (raw) => {
|
|
55
55
|
let message = JSON.parse(raw);
|
|
56
56
|
|
|
57
|
+
if (message.type === 'error') {
|
|
58
|
+
console.error(message);
|
|
59
|
+
}
|
|
60
|
+
|
|
57
61
|
if (this.ps[message.requestId]) {
|
|
58
62
|
this.ps[message.requestId].resolve(message);
|
|
59
63
|
delete this.ps[message.requestId];
|
package/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testdriverai",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.6",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "testdriverai",
|
|
9
|
-
"version": "5.0.
|
|
9
|
+
"version": "5.0.6",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@e2b/desktop": "^1.6.0",
|
|
@@ -2913,9 +2913,9 @@
|
|
|
2913
2913
|
}
|
|
2914
2914
|
},
|
|
2915
2915
|
"node_modules/electron": {
|
|
2916
|
-
"version": "33.4.
|
|
2917
|
-
"resolved": "https://registry.npmjs.org/electron/-/electron-33.4.
|
|
2918
|
-
"integrity": "sha512-
|
|
2916
|
+
"version": "33.4.5",
|
|
2917
|
+
"resolved": "https://registry.npmjs.org/electron/-/electron-33.4.5.tgz",
|
|
2918
|
+
"integrity": "sha512-rbDc4QOqfMT1uopUG+KcaMKzKgFAXAzN3wNIdgErnB1tUnpgTxwFv1BDN/exCl1vaVWBeM9YtbO5PgbGZeq7xw==",
|
|
2919
2919
|
"hasInstallScript": true,
|
|
2920
2920
|
"license": "MIT",
|
|
2921
2921
|
"dependencies": {
|