mirror of
https://github.com/Netflix/dial-reference.git
synced 2026-06-08 10:59:59 +00:00
use yargs to get commandline params for nodejs tests
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var colors = require("colors/safe");
|
const colors = require("colors/safe");
|
||||||
var sprintf = require("sprintf-js").sprintf;
|
const sprintf = require("sprintf-js").sprintf;
|
||||||
|
|
||||||
function getParam(key) {
|
function getParam(key) {
|
||||||
var value;
|
var value;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
"node-ssdp": "^3.2.0",
|
"node-ssdp": "^3.2.0",
|
||||||
"q": "~1.4.1",
|
"q": "~1.4.1",
|
||||||
"request": "^2.78.0",
|
"request": "^2.78.0",
|
||||||
"sprintf-js": "~1.0.3"
|
"sprintf-js": "~1.0.3",
|
||||||
|
"yargs": "^6.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,23 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var testServer = utils.getParam("host");
|
var testServer = argv.host;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|||||||
@@ -4,10 +4,31 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var app = utils.getParam("app");
|
var app = argv.application;
|
||||||
var timeToWaitForStateChange = utils.getParam("timeToWaitForStateChange") || 5000;
|
var timeToWaitForStateChange = argv.timeToWaitForStateChange || 5000;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|||||||
@@ -4,10 +4,31 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var app = utils.getParam("app");
|
var app = argv.application;
|
||||||
var timeToWaitForStateChange = utils.getParam("timeToWaitForStateChange") || 5000;
|
var timeToWaitForStateChange = argv.timeToWaitForStateChange || 5000;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|||||||
@@ -4,10 +4,31 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var app = utils.getParam("app");
|
var app = argv.application;
|
||||||
var timeToWaitForStateChange = utils.getParam("timeToWaitForStateChange") || 5000;
|
var timeToWaitForStateChange = argv.timeToWaitForStateChange || 5000;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|||||||
@@ -4,10 +4,31 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var app = utils.getParam("app");
|
var app = argv.application;
|
||||||
var timeToWaitForStateChange = utils.getParam("timeToWaitForStateChange") || 5000;
|
var timeToWaitForStateChange = argv.timeToWaitForStateChange || 5000;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|||||||
@@ -4,10 +4,31 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var app = utils.getParam("app");
|
var app = argv.application;
|
||||||
var timeToWaitForStateChange = utils.getParam("timeToWaitForStateChange") || 5000;
|
var timeToWaitForStateChange = argv.timeToWaitForStateChange || 5000;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|||||||
@@ -4,10 +4,31 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var app = utils.getParam("app");
|
var app = argv.application;
|
||||||
var timeToWaitForStateChange = utils.getParam("timeToWaitForStateChange") || 5000;
|
var timeToWaitForStateChange = argv.timeToWaitForStateChange || 5000;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|||||||
@@ -4,10 +4,31 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var app = utils.getParam("app");
|
var app = argv.application;
|
||||||
var timeToWaitForStateChange = utils.getParam("timeToWaitForStateChange") || 5000;
|
var timeToWaitForStateChange = argv.timeToWaitForStateChange || 5000;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|||||||
@@ -4,10 +4,31 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var app = utils.getParam("app");
|
var app = argv.application;
|
||||||
var timeToWaitForStateChange = utils.getParam("timeToWaitForStateChange") || 5000;
|
var timeToWaitForStateChange = argv.timeToWaitForStateChange || 5000;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|||||||
@@ -4,10 +4,31 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var app = utils.getParam("app");
|
var app = argv.application;
|
||||||
var timeToWaitForStateChange = utils.getParam("timeToWaitForStateChange") || 5000;
|
var timeToWaitForStateChange = argv.timeToWaitForStateChange || 5000;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|||||||
@@ -4,9 +4,30 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var timeToWaitForStateChange = utils.getParam("timeToWaitForStateChange") || 5000;
|
var timeToWaitForStateChange = argv.timeToWaitForStateChange || 5000;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|||||||
@@ -4,9 +4,24 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var app = utils.getParam("app");
|
var app = argv.application;
|
||||||
|
|
||||||
var payload = "key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&"
|
var payload = "key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&"
|
||||||
+ "key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&"
|
+ "key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&key=value&"
|
||||||
|
|||||||
@@ -4,10 +4,31 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var app = utils.getParam("app");
|
var app = argv.application;
|
||||||
var timeToWaitForStateChange = utils.getParam("timeToWaitForStateChange") || 5000;
|
var timeToWaitForStateChange = argv.timeToWaitForStateChange || 5000;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|||||||
@@ -4,10 +4,31 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var app = utils.getParam("app");
|
var app = argv.application;
|
||||||
var timeToWaitForStateChange = utils.getParam("timeToWaitForStateChange") || 5000;
|
var timeToWaitForStateChange = argv.timeToWaitForStateChange || 5000;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|||||||
@@ -4,10 +4,31 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var app = utils.getParam("app");
|
var app = argv.application;
|
||||||
var timeToWaitForStateChange = utils.getParam("timeToWaitForStateChange") || 5000;
|
var timeToWaitForStateChange = argv.timeToWaitForStateChange || 5000;
|
||||||
var instanceUrl;
|
var instanceUrl;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
|
|||||||
@@ -4,10 +4,31 @@ var dial = require("../libs/dialClient.js"),
|
|||||||
utils = require("../libs/utils.js"),
|
utils = require("../libs/utils.js"),
|
||||||
Q = require("q");
|
Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
var host = utils.getParam("host");
|
var host = argv.host;
|
||||||
var app = utils.getParam("app");
|
var app = argv.application;
|
||||||
var timeToWaitForStateChange = utils.getParam("timeToWaitForStateChange") || 5000;
|
var timeToWaitForStateChange = argv.timeToWaitForStateChange || 5000;
|
||||||
|
|
||||||
return new Q()
|
return new Q()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
|
|||||||
@@ -2,6 +2,27 @@
|
|||||||
|
|
||||||
var Q = require("q");
|
var Q = require("q");
|
||||||
|
|
||||||
|
const argv = require("yargs")
|
||||||
|
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
|
||||||
|
.option("host", {
|
||||||
|
describe: "IP address of host on which DIAL server under test is running",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("application", {
|
||||||
|
alias: "app",
|
||||||
|
describe: "Application to test",
|
||||||
|
type: "string",
|
||||||
|
demand: true
|
||||||
|
})
|
||||||
|
.option("timeToWaitForStateChange", {
|
||||||
|
alias: "ttw",
|
||||||
|
describe: "Time(ms) to wait between state changes before querying application status",
|
||||||
|
type: "string",
|
||||||
|
default: 5000
|
||||||
|
})
|
||||||
|
.help("help").alias("help", "h").argv;
|
||||||
|
|
||||||
var discoverServerUnderTest = require("../tests/discoverServerUnderTest.js"),
|
var discoverServerUnderTest = require("../tests/discoverServerUnderTest.js"),
|
||||||
launchApplicationNotRecognized = require("../tests/launchApplicationNotRecognized.js"),
|
launchApplicationNotRecognized = require("../tests/launchApplicationNotRecognized.js"),
|
||||||
launchApplicationInRunningStateWithNoPayload = require("../tests/launchApplicationInRunningStateWithNoPayload.js"),
|
launchApplicationInRunningStateWithNoPayload = require("../tests/launchApplicationInRunningStateWithNoPayload.js"),
|
||||||
|
|||||||
Reference in New Issue
Block a user