karma
karma copied to clipboard
Does not run tests, multiple failures.
Expected behavior
Tests will run
Actual behavior
Opens 3 different IE windows, throws errors, windows will not run tests. Error log:
15 07 2016 11:24:16.821:DEBUG [plugin]: Loading plugin karma-ie-launcher.
15 07 2016 11:24:16.871:DEBUG [plugin]: Loading plugin karma-mocha.
15 07 2016 11:24:16.881:DEBUG [plugin]: Loading plugin karma-requirejs.
15 07 2016 11:24:16.891:DEBUG [plugin]: Loading plugin karma-chai.
15 07 2016 11:24:16.891:DEBUG [plugin]: Loading plugin karma-browserify.
15 07 2016 11:24:17.431:DEBUG [framework.browserify]: created browserify bundle: C:\Users\ehume\AppData\Local\Temp\b85da555be3b9e64a45a754
e7f6b734d.browserify
15 07 2016 11:24:17.441:INFO [framework.browserify]: registering rebuild (autoWatch=true)
15 07 2016 11:24:17.441:DEBUG [framework.browserify]: no matching preprocessed file was found, defaulting to prepend
15 07 2016 11:24:17.441:DEBUG [framework.browserify]: add bundle to config.files at position 0
15 07 2016 11:24:17.441:DEBUG [web-server]: Instantiating middleware
15 07 2016 11:24:17.501:DEBUG [framework.browserify]: building bundle
15 07 2016 11:24:18.201:DEBUG [framework.browserify]: bundling
15 07 2016 11:24:18.201:INFO [framework.browserify]: 454 bytes written (0.00 seconds)
15 07 2016 11:24:18.201:INFO [framework.browserify]: bundle built
15 07 2016 11:24:18.211:DEBUG [watcher]: Watching "C:\Users\ehume\AppData\Local\Temp\b85da555be3b9e64a45a754e7f6b734d.browserify"
15 07 2016 11:24:18.211:DEBUG [watcher]: Watching "C:/AutomationTool/angular-node/test-main.js"
15 07 2016 11:24:18.211:DEBUG [watcher]: Watching "C:/AutomationTool/angular-node/node_modules/requirejs/require.js"
15 07 2016 11:24:18.211:DEBUG [watcher]: Watching "C:/AutomationTool/angular-node/node_modules/karma-requirejs/lib/adapter.js"
15 07 2016 11:24:18.211:DEBUG [watcher]: Watching "C:/AutomationTool/angular-node/public/bower_components/angular/angular.js"
15 07 2016 11:24:18.211:DEBUG [watcher]: Watching "C:/AutomationTool/angular-node/public/bower_components/angular-route/angular-route.js"
15 07 2016 11:24:18.211:DEBUG [watcher]: Watching "C:/AutomationTool/angular-node/public/bower_components/angular-mocks/angular-mocks.js"
15 07 2016 11:24:18.211:DEBUG [watcher]: Watching "C:/AutomationTool/angular-node/node_modules/chai/chai.js"
15 07 2016 11:24:18.211:DEBUG [watcher]: Watching "C:/AutomationTool/angular-node/test/angular/servicesTestService-testing.js"
15 07 2016 11:24:18.221:INFO [karma]: Karma v1.1.1 server started at http://127.0.0.1:9876/
15 07 2016 11:24:18.221:INFO [launcher]: Launching browser IE with unlimited concurrency
15 07 2016 11:24:18.261:INFO [launcher]: Starting browser IE
15 07 2016 11:24:18.261:DEBUG [temp-dir]: Creating temp dir at C:\Users\ehume\AppData\Local\Temp\karma-39924402
15 07 2016 11:24:18.261:DEBUG [launcher]: C:\Program Files\Internet Explorer\iexplore.exe http://127.0.0.1:9876/?id=39924402
15 07 2016 11:24:18.471:DEBUG [web-server]: serving: C:\AutomationTool\angular-node\node_modules\karma\static/client.html
15 07 2016 11:24:18.551:DEBUG [karma]: A browser has connected on socket /#JSg81mFqoXYSlbfCAAAA
15 07 2016 11:24:18.551:DEBUG [web-server]: upgrade /socket.io/?EIO=3&transport=websocket&sid=JSg81mFqoXYSlbfCAAAA
15 07 2016 11:24:18.571:INFO [IE 11.0.0 (Windows 7 0.0.0)]: Connected on socket /#JSg81mFqoXYSlbfCAAAA with id 39924402
15 07 2016 11:24:18.581:DEBUG [launcher]: IE (id 39924402) captured in 0.36 secs
15 07 2016 11:24:18.581:DEBUG [karma]: All browsers are ready, executing
15 07 2016 11:24:18.581:DEBUG [karma]: Captured 1 browsers
15 07 2016 11:24:18.593:DEBUG [middleware:karma]: custom files null null
15 07 2016 11:24:18.593:DEBUG [middleware:karma]: Serving static request /context.html
15 07 2016 11:24:18.593:DEBUG [web-server]: serving: C:\AutomationTool\angular-node\node_modules\karma\static/context.html
IE 11.0.0 (Windows 7 0.0.0) ERROR
You need to include some adapter that implements __karma__.start method!
15 07 2016 11:24:18.801:DEBUG [launcher]: Killed extra IE process 2688
15 07 2016 11:24:18.801:DEBUG [launcher]: Process IE exited with code 0
15 07 2016 11:24:18.801:ERROR [launcher]: IE crashed.
15 07 2016 11:24:18.801:DEBUG [temp-dir]: Cleaning temp dir C:\Users\ehume\AppData\Local\Temp\karma-39924402
15 07 2016 11:24:18.801:INFO [launcher]: Trying to start IE again (1/2).
15 07 2016 11:24:18.811:DEBUG [launcher]: Restarting IE
15 07 2016 11:24:18.811:DEBUG [temp-dir]: Creating temp dir at C:\Users\ehume\AppData\Local\Temp\karma-39924402
15 07 2016 11:24:18.811:DEBUG [launcher]: C:\Program Files\Internet Explorer\iexplore.exe http://127.0.0.1:9876/?id=39924402
15 07 2016 11:24:18.871:DEBUG [web-server]: serving (cached): C:\AutomationTool\angular-node\node_modules\karma\static/client.html
15 07 2016 11:24:18.921:DEBUG [karma]: A browser has connected on socket /#cO7O7YAHFW_pztpnAAAB
15 07 2016 11:24:18.931:DEBUG [web-server]: upgrade /socket.io/?EIO=3&transport=websocket&sid=cO7O7YAHFW_pztpnAAAB
15 07 2016 11:24:18.958:DEBUG [launcher]: Killed extra IE process 10372
15 07 2016 11:24:18.958:DEBUG [launcher]: Process IE exited with code 0
15 07 2016 11:24:18.958:ERROR [launcher]: Cannot start IE
15 07 2016 11:24:18.958:DEBUG [temp-dir]: Cleaning temp dir C:\Users\ehume\AppData\Local\Temp\karma-39924402
15 07 2016 11:24:18.961:DEBUG [IE 11.0.0 (Windows 7 0.0.0)]: New connection /#cO7O7YAHFW_pztpnAAAB (already have /#JSg81mFqoXYSlbfCAAAA)
15 07 2016 11:24:18.963:INFO [launcher]: Trying to start IE again (2/2).
15 07 2016 11:24:18.963:DEBUG [launcher]: Restarting IE
15 07 2016 11:24:18.963:DEBUG [temp-dir]: Creating temp dir at C:\Users\ehume\AppData\Local\Temp\karma-39924402
15 07 2016 11:24:18.966:DEBUG [launcher]: C:\Program Files\Internet Explorer\iexplore.exe http://127.0.0.1:9876/?id=39924402
15 07 2016 11:24:19.056:DEBUG [web-server]: serving (cached): C:\AutomationTool\angular-node\node_modules\karma\static/client.html
15 07 2016 11:24:19.106:DEBUG [karma]: A browser has connected on socket /#4sU12c9jOEnQZ3z4AAAC
15 07 2016 11:24:19.116:DEBUG [web-server]: upgrade /socket.io/?EIO=3&transport=websocket&sid=4sU12c9jOEnQZ3z4AAAC
15 07 2016 11:24:19.126:DEBUG [IE 11.0.0 (Windows 7 0.0.0)]: New connection /#4sU12c9jOEnQZ3z4AAAC (already have /#JSg81mFqoXYSlbfCAAAA, /
#cO7O7YAHFW_pztpnAAAB)
15 07 2016 11:24:19.126:DEBUG [launcher]: Killed extra IE process 7968
15 07 2016 11:24:19.126:DEBUG [launcher]: Process IE exited with code 0
15 07 2016 11:24:19.126:ERROR [launcher]: Cannot start IE
15 07 2016 11:24:19.126:DEBUG [temp-dir]: Cleaning temp dir C:\Users\ehume\AppData\Local\Temp\karma-39924402
15 07 2016 11:24:19.136:ERROR [launcher]: IE failed 2 times (cannot start). Giving up.
15 07 2016 11:24:24.618:DEBUG [IE 11.0.0 (Windows 7 0.0.0)]: Disconnected /#4sU12c9jOEnQZ3z4AAAC, still have /#JSg81mFqoXYSlbfCAAAA, /#cO7
O7YAHFW_pztpnAAAB
15 07 2016 11:24:25.498:DEBUG [IE 11.0.0 (Windows 7 0.0.0)]: Disconnected /#cO7O7YAHFW_pztpnAAAB, still have /#JSg81mFqoXYSlbfCAAAA
15 07 2016 11:24:25.908:WARN [IE 11.0.0 (Windows 7 0.0.0)]: Disconnected (1 times)
IE 11.0.0 (Windows 7 0.0.0) ERROR
Disconnectedundefined
15 07 2016 11:24:29.128:WARN [IE 11.0.0 (Windows 7 0.0.0)]: Disconnected (2 times), because no message in 10000 ms.
IE 11.0.0 (Windows 7 0.0.0) ERROR
Disconnected, because no message in 10000 ms.
15 07 2016 11:51:05.231:DEBUG [launcher]: Disconnecting all browsers
15 07 2016 11:51:05.231:DEBUG [framework.browserify]: cleaning up
Enviroment Details
- Karma version (output of
karma --version): 1.1.1 - Relevant part of your
karma.config.jsfile
`// Karma configuration
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
plugins: ['karma-ie-launcher', 'karma-mocha', 'karma-requirejs', 'karma-chai', 'karma-browserify'],
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'requirejs', 'chai', 'browserify'],
// list of files / patterns to load in the browser
files: [
'test-main.js',
'node_modules/requirejs/require.js',
'node_modules/karma-requirejs/lib/adapter.js',
'public/bower_components/angular/angular.js',
'public/bower_components/angular-route/angular-route.js',
'public/bower_components/angular-mocks/angular-mocks.js',
"node_modules/chai/chai.js",
//"public/src/**/*.js",
"test/angular/servicesTestService-testing.js"
],
// list of files to exclude
exclude: [
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
//'test/angular/*.js': [ 'browserify' ]
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_DEBUG,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['IE'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
`
Steps to reproduce the behaviour
- karma init, with IE, mocha, files specified above.
- karma start
P.S. I am extremely new I apologize if I put things in the wrong place. Please bear with me and let me know if you need additional information.
Try removing
'node_modules/requirejs/require.js',
'node_modules/karma-requirejs/lib/adapter.js',
from the files array. Seems that the docs for v1.0 need to be updated.
ok done, but no difference made to the errors. Still the same problem
Duplicate of #2194