Can anyone help shed some light on what is stopping the Karma javacript test runner from connecting to my selenium or selenium server?
I have a successfully working selenium selenium environment that I already use with selenium python bindings to test a web application system. I am currently running Selenium Server v.2.34.0, and 4 separate grid nodes are connected to it.
I want to also use and reuse this resource for testing javascript for multiple browsers. In particular, I am using node.js test drive based on jasmine based testing. I installed the karma-webdriver-launcher plugin . "I can run my javascript tests with karma locally creating firefox, chrome or IE browsers.
When I try to use a remote selenium server to use a browser from a pool / farm, it cannot find the browser, and I get the following warning output:
DEBUG [config]: autoWatch set to false, because of singleRun
DEBUG [plugin]: Loading karma-* from C:\nodedebug\itpt\node_modules
DEBUG [plugin]: Loading plugin C:\nodedebug\itpt\node_modules/karma-chrome-launcher.
DEBUG [plugin]: Loading plugin C:\nodedebug\itpt\node_modules/karma-firefox-launcher.
DEBUG [plugin]: Loading plugin C:\nodedebug\itpt\node_modules/karma-html-reporter.
DEBUG [plugin]: Loading plugin C:\nodedebug\itpt\node_modules/karma-ie-launcher.
DEBUG [plugin]: Loading plugin C:\nodedebug\itpt\node_modules/karma-jasmine.
DEBUG [plugin]: Loading plugin C:\nodedebug\itpt\node_modules/karma-phantomjs-launcher.
DEBUG [plugin]: Loading plugin C:\nodedebug\itpt\node_modules/karma-typescript-preprocessor.
DEBUG [plugin]: Loading plugin C:\nodedebug\itpt\node_modules/karma-webdriver-launcher.
DEBUG [plugin]: Loading inlined plugin (defining launcher:firefox).
INFO [karma]: Karma v0.12.16 server started at http://localhost:9876/
INFO [launcher]: Starting browser firefox via Remote WebDriver
WARN [launcher]: firefox via Remote WebDriver have not captured in 60000 ms, killing.
Killed Karma test.
, , , , wd. javascript node , - . , , , URL-, , .
- -webdriver-launcher\ node_modules\wd\lib\webdriver.js 33,
this._request(httpOpts, function(err, res, data) {
karma.config.js: -
module.exports = function (config) {
var webdriverConfig = {
hostname: '172.17.126.52',
port: 9625
}
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
'Scripts/Libs/JsResources.js',
'Scripts/Local/**/*.ts'
],
preprocessors: {
'**/*.ts': ['typescript']
},
typescriptPreprocessor: {
options: {
target: 'ES5',
}
},
reporters: ['dots', 'html'],
port: 9876,
colors: true,
logLevel: config.LOG_DEBUG,
autoWatch: true,
customLaunchers: {
'firefox': {
base: 'WebDriver',
config: webdriverConfig,
browserName: 'firefox',
}
},
browsers: ['firefox'],
singleRun: true
});
};