示例#1
0
	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);
	};
示例#2
0
	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();
		}
	};
示例#3
0
	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();
		}
	};
示例#4
0
		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();
			}
		});
示例#5
0
	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();
		}
	};