1
This commit is contained in:
parent
c3bfcb7e8a
commit
e3671026d3
@ -1 +1 @@
|
||||
node ../../tools/robot/app.js
|
||||
node ../../tools/robot/app.js -hws://192.168.100.45:7801
|
||||
|
14
tools/robot/package-lock.json
generated
14
tools/robot/package-lock.json
generated
@ -9,6 +9,7 @@
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"axios": "^0.27.0",
|
||||
"minimist": "^1.2.6",
|
||||
"nodejs-websocket": "^1.7.2",
|
||||
"protobufjs": "^6.11.2"
|
||||
}
|
||||
@ -166,6 +167,14 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/nodejs-websocket": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/nodejs-websocket/-/nodejs-websocket-1.7.2.tgz",
|
||||
@ -325,6 +334,11 @@
|
||||
"mime-db": "1.52.0"
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="
|
||||
},
|
||||
"nodejs-websocket": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/nodejs-websocket/-/nodejs-websocket-1.7.2.tgz",
|
||||
|
@ -7,6 +7,7 @@
|
||||
"dependencies": {
|
||||
"axios": "^0.27.0",
|
||||
"nodejs-websocket": "^1.7.2",
|
||||
"protobufjs": "^6.11.2"
|
||||
"protobufjs": "^6.11.2",
|
||||
"minimist": "^1.2.6"
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,18 @@
|
||||
const axios = require('axios').default;
|
||||
const parseArgs = require('minimist');
|
||||
const ClientNet = require('./clientnet');
|
||||
|
||||
function getTickCount() {
|
||||
return Math.floor((new Date()).getTime() / 1);
|
||||
}
|
||||
|
||||
function getArgv(name, def = null) {
|
||||
const argv = parseArgs(process.argv.slice(2), opts = {
|
||||
string: [name]
|
||||
});
|
||||
return argv[name] ? argv[name] : def;
|
||||
}
|
||||
|
||||
function httpGet(url, params) {
|
||||
return new Promise((resolve) => {
|
||||
const ret = {
|
||||
@ -38,7 +46,7 @@ async function sleep(timeout) {
|
||||
class TestCase {
|
||||
|
||||
constructor(url) {
|
||||
this.relationUrl = 'ws://192.168.100.45:7801';
|
||||
this.relationUrl = getArgv('h');
|
||||
this.loginData = null;
|
||||
this.userData = null;
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user