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",
|
"version": "1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.27.0",
|
"axios": "^0.27.0",
|
||||||
|
"minimist": "^1.2.6",
|
||||||
"nodejs-websocket": "^1.7.2",
|
"nodejs-websocket": "^1.7.2",
|
||||||
"protobufjs": "^6.11.2"
|
"protobufjs": "^6.11.2"
|
||||||
}
|
}
|
||||||
@ -166,6 +167,14 @@
|
|||||||
"node": ">= 0.6"
|
"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": {
|
"node_modules/nodejs-websocket": {
|
||||||
"version": "1.7.2",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/nodejs-websocket/-/nodejs-websocket-1.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/nodejs-websocket/-/nodejs-websocket-1.7.2.tgz",
|
||||||
@ -325,6 +334,11 @@
|
|||||||
"mime-db": "1.52.0"
|
"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": {
|
"nodejs-websocket": {
|
||||||
"version": "1.7.2",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/nodejs-websocket/-/nodejs-websocket-1.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/nodejs-websocket/-/nodejs-websocket-1.7.2.tgz",
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.27.0",
|
"axios": "^0.27.0",
|
||||||
"nodejs-websocket": "^1.7.2",
|
"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 axios = require('axios').default;
|
||||||
|
const parseArgs = require('minimist');
|
||||||
const ClientNet = require('./clientnet');
|
const ClientNet = require('./clientnet');
|
||||||
|
|
||||||
function getTickCount() {
|
function getTickCount() {
|
||||||
return Math.floor((new Date()).getTime() / 1);
|
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) {
|
function httpGet(url, params) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
const ret = {
|
const ret = {
|
||||||
@ -38,7 +46,7 @@ async function sleep(timeout) {
|
|||||||
class TestCase {
|
class TestCase {
|
||||||
|
|
||||||
constructor(url) {
|
constructor(url) {
|
||||||
this.relationUrl = 'ws://192.168.100.45:7801';
|
this.relationUrl = getArgv('h');
|
||||||
this.loginData = null;
|
this.loginData = null;
|
||||||
this.userData = null;
|
this.userData = null;
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user