/** * Tools for setting up the casperjs tests * mainly setting host, port and path path **/ // load config files var fs = require('fs'); var env = require('system').env; var args = require('system').args; var utils = require('utils'); var host = 'localhost'; var port = 80; var path = 'icingaweb'; var verbose = false; var user = 'jdoe'; var pass = 'password'; if (typeof(env.CASPERJS_HOST) === 'string') host = env.CASPERJS_HOST; if (typeof(env.CASPERJS_PORT) === 'string') port = parseInt(env.CASPERJS_PORT, 10); if (typeof(env.CASPERJS_PATH) === 'string') path = env.CASPERJS_PATH; if (typeof(env.CASPERJS_USER) === 'string') user = env.CASPERJS_USER; if (typeof(env.CASPERJS_PASS) === 'string') pass = env.CASPERJS_PASS; for (var i=0;i