diff --git a/lib/executors/Runner.js b/lib/executors/Runner.js index 29137c30e..64811cedf 100644 --- a/lib/executors/Runner.js +++ b/lib/executors/Runner.js @@ -162,6 +162,14 @@ define([ .then(startTunnel); }, + _buildServerOptions : function(config) { + var result = {}; + if (config.internServerOptions !== undefined && config.internServerOptions.proxy !== undefined) { + result.proxy = config.proxy; + } + return result; + }, + /** * Creates suites for each environment in which tests will be executed. * @@ -173,9 +181,8 @@ define([ _createSuites: function (config, tunnel, overrides) { var proxy = this.proxy; var reporterManager = this.reporterManager; - var server = new Server(tunnel.clientUrl, { - proxy: tunnel.proxy - }); + var serverOptions = this._buildServerOptions(config); + var server = new Server(tunnel.clientUrl, serverOptions); server.sessionConstructor = ProxiedSession; return util.flattenEnvironments(config.capabilities, config.environments).map(function (environmentType) {