Right now My code for running my test is
Chrometest.js:
"use strict";
require("../helpers/setup");
var wd = require("wd"),
_ = require('underscore'),
serverConfigs = require('../helpers/appium-servers'),
appium = require('../node_modules/appium/lib/server/main.js'),
parser = require('../node_modules/appium/lib/server/parser.js');
var uTests = require("../dal/tests").list; // in this there is list of test which gets executed
var serverHost = require("../dal/tests").serverHost;
//var args = parser().parseArgs();
describe("Android Chrome browser", function () {
this.timeout(900000);
var driver;
var allPassed = true;
before(function () {
appium.run(args, function () { /* console.log('Rock and roll.'.grey); */ });
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);
});
after(function () {
return driver
.quit();
});
I am running this piece of code using command - mocha chrometest.js
I am trying to run appium in before function