var uTests = require("…/dal/tests").list;
var serverHost = require("…/dal/tests").serverHost;
//describe(“Android Chrome browser”, function () {
describe(“android local server”, function () {
this.timeout(900000);
var driver;
var allPassed = true;
before(function () {
localServer.start();
var serverConfig = serverConfigs.local;
driver = wd.promiseChainRemote(serverConfig);
require("…/helpers/logging").configure(driver);
var desired = _.clone(require("../helpers/caps").android19);
desired.browserName = 'Chrome';
return driver.init(desired);
@psingh
To start the server you just need to start a new nodejs process and pass the appium.js file to it and that’s it (You might also want to pass cusotm server arguments in case you need that).
@Hassan_Radi…Thats what I am trying to first start node and then run appium.js…but couldnt figure out how to do that in javascript…how to execute a command to run it…
Is there any way to start and stop appium server on a remote machine programmatically? I have a server machine where all the devices are connected with Appium Setup. We are doing a feasibility study to perform parallel execution without using GRID and so it is required to start different instances of appium server on various ports on the remote machine. We have done the feasibility on our local machines, but looking for a way to start appium server on remote machine. Any help on this will be grateful! Thanks.
Note:
We are doing this feasibility on a windows server machine for Android devices
Can you let me know the steps to do it? We are using Jenkins for triggering our test execution. If you could throw some light on how to do it, I can try it out. Thanks.
Mention below the code for running Appium server
Create a .bat file and write this code @echo on
cd /d E:\Appium\node_modules\appium
E:\Appium\node . -a 127.0.0.1
Before initializing run the batch file.
OR: You can use below code to run the Appium server. This is work with Appium version 1.3.5 and above it has some issue that I am analysing.
public static final void startAppium() throws IOException, InterruptedException {
CommandLine command = new CommandLine("/Applications/Appium.app/Contents/Resources/node/bin/node");
command.addArgument("/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js", false);
command.addArgument("–address", false);
command.addArgument(“127.0.0.1”);
command.addArgument("–port", false);
command.addArgument(“4723”);
command.addArgument("–log-level");
command.addArgument(“warn”);
command.addArgument("–session-override",true);
command.addArgument("–local-timezone",true);
command.addArgument("–log-no-colors", true);
command.addArgument("–backend-retries");
command.addArgument(“6”); //command.addArgument("–force-quit-instruments",true); //command.addArgument("–log-g /Users/slinger/Desktop/appium.log");
// command.addArgument("–native-instruments-lib",true);
/command.addArgument("–automation-name");
command.addArgument(“Jitu_iPad_Automation”);/ //command.addArgument("–ignoreUnimportantViews",true);
// command.addArgument("–autoAcceptAlerts",false); //command.addArgument("–show-ios-log"); //command.addArgument("–full-reset", false);
// command.addArgument("–nativeInstrumentsLib",true);
DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();
DefaultExecutor executor = new DefaultExecutor();
executor.setExitValue(0);
executor.execute(command, resultHandler);
Thread.sleep(5000);
System.out.println(“Appium server started”);
}