this.startTestPass = function(commandElements) { var deleteCallback = function() { deleteHarness(runCallback); } var runCallback = function() { runHarness(connectCallback, commandFinishedCallback); } var connectCallback = function() { connectToHarness(commandFinishedCallback); } /* don't bother trying to load the sim version unless it has never been loaded (IE: don't wipe out the simVersion when restarting for multiple configs */ if(customSimVersion === null) { // pull out ios specific start arguments var simVersionArg = util.getArgument(commandElements, "--sim-version"); if (simVersionArg) { customSimVersion = simVersionArg; simVersion = customSimVersion; } else { simVersion = defaultSimVersion; } } common.startTestPass(commandElements, deleteCallback); };
this.processCommand = function(command) { var commandElements = command.split(" "); if (commandElements[0] === "start") { var browserOnlyArg = driverUtils.getArgument(commandElements, "--browser-only"); if (browserOnlyArg === "true") { browserOnlyMode = browserOnlyArg; } common.startTestPass(commandElements, self.startConfig, commandFinishedCallback); } else if (commandElements[0] === "exit") { process.exit(1); } else { driverUtils.log("invalid command\n\n" + "Commands:\n" + " start - starts test run which includes starting over with clean harness project\n" + " Arguments (optional):\n" + " --config-set=<config set ID> - runs the specified config set\n" + " --config=<config ID> - runs the specified configuration only\n" + " --suite=<suite name> - runs the specified suite only\n" + " --test=<test name> - runs the specified test only (--suite must be specified)\n" + " --browser-only=<boolean> - if set to true, the harness is not deployed to a device\n" + " and instead the user is expected to manually load the \"127.0.0.1/index.html\"\n" + " url in order to run tests. Reloading the page manually will be required when\n" + " the harness is restarted due to a config finishing or an error occurring\n\n" + " exit - exit driver\n", 0, true); commandFinishedCallback(); } };
this.processCommand = function(command) { var commandElements = command.split(" "); if (commandElements[0] === "start") { simVersion = driverGlobal.config.defaultIosSimVersion var simVersionArg = driverUtils.getArgument(commandElements, "--sim-version"); if ((typeof simVersionArg) === "string") { simVersion = simVersionArg; } else if (((typeof simVersionArg) !== "undefined") && ((typeof simVersionArg) !== "string")) { console.log("--sim-version argument found but is not a string, using default"); } common.startTestPass(commandElements, self.startConfig, commandFinishedCallback); } else if (commandElements[0] === "exit") { process.exit(1); } else { console.log("invalid command\n\n" + "Commands:\n" + " start - starts test run which includes starting over with clean harness project\n" + " Arguments (optional):\n" + " --config-set=<config set ID> - runs the specified config set\n" + " --config=<config ID> - runs the specified configuration only\n" + " --suite=<suite name> - runs the specified suite only\n" + " --test=<test name> - runs the specified test only (--suite must be specified)\n" + " --sim-version=<version> - sets the desired iOS simulator version to run\n\n" + " exit - exit driver\n"); commandFinishedCallback(); } };
android.deviceIsConnected(function(connected) { if(connected) { common.startTestPass(commandElements, deleteCallback); } else { util.log("no attached device found, unable to start test pass", driverGlobal.logLevels.quiet); commandFinishedCallback(); } });
this.processCommand = function(command) { var commandElements = command.split(" "); if (commandElements[0] === "start") { common.startTestPass(commandElements, self.startConfig, commandFinishedCallback); } else if (commandElements[0] === "exit") { process.exit(1); } else { console.log("invalid command\n\n" + "Commands:\n" + " start - starts test run which includes starting over with clean harness project\n" + " Arguments (optional):\n" + " --config-set=<config set ID> - runs the specified config set\n" + " --config=<config ID> - runs the specified configuration only\n" + " --suite=<suite name> - runs the specified suite only\n" + " --test=<test name> - runs the specified test only (--suite must be specified)\n\n" + " exit - exit driver\n"); commandFinishedCallback(); } };