Когда я использую Chrome в своих тестах кармы, я часто (более 50% всех прогонов) вижу, что каждый тест выполняется дважды Chrome. Ниже вы можете найти пример вывода и мою конфигурацию.
Как я могу остановить это? В чем причина?
karma start --single-run --browsers Firefox,Chrome
INFO [karma]: Karma v0.12.17 server started at http://localhost:9876/
INFO [launcher]: Starting browser Firefox
INFO [launcher]: Starting browser Chrome
INFO [Chrome 36.0.1985 (Linux)]: Connected on socket RV8G8p63bCLQGaAJW9Hc with id 91444447
Chrome 36.0.1985 (Linux): Executed 0 of 92 SUCCESS (0 secs / 0 secs)
Chrome 36.0.1985 (Linux): Executed 1 of 92 SUCCESS (0 secs / 0.065 secs)
[...]
Chrome 36.0.1985 (Linux): Executed 91 of 92 SUCCESS (0 secs / 0.24 secs)
Chrome 36.0.1985 (Linux): Executed 92 of 92 SUCCESS (0 secs / 0.241 secs)
Chrome 36.0.1985 (Linux): Executed 92 of 92 SUCCESS (0.274 secs / 0.241 secs)
Chrome 36.0.1985 (Linux): Executed 93 of 92 SUCCESS (0.274 secs / 0.258 secs)
[...]
Chrome 36.0.1985 (Linux): Executed 183 of 92 SUCCESS (0.274 secs / 0.412 secs)
Chrome 36.0.1985 (Linux): Executed 184 of 92 SUCCESS (0.274 secs / 0.413 secs)
INFO [Iceweasel 30.0.0 (Linux)]: Connected on socket 4DISHs7012QeIwhEW9Hd with id 93232241
Chrome 36.0.1985 (Linux): Executed 184 of 92 SUCCESS (0.274 secs / 0.413 secs)
Iceweasel 30.0.0 (Linux): Executed 0 of 92 SUCCESS (0 secs / 0 secs)
Chrome 36.0.1985 (Linux): Executed 184 of 92 SUCCESS (0.274 secs / 0.413 secs)
Iceweasel 30.0.0 (Linux): Executed 1 of 92 SUCCESS (0 secs / 0.003 secs)
[...]
Iceweasel 30.0.0 (Linux): Executed 91 of 92 SUCCESS (0 secs / 0.201 secs)
Chrome 36.0.1985 (Linux): Executed 184 of 92 SUCCESS (0.274 secs / 0.413 secs)
Iceweasel 30.0.0 (Linux): Executed 92 of 92 SUCCESS (0 secs / 0.202 secs)
Chrome 36.0.1985 (Linux): Executed 184 of 92 SUCCESS (0.274 secs / 0.413 secs)
Iceweasel 30.0.0 (Linux): Executed 92 of 92 SUCCESS (0.303 secs / 0.202 secs)
TOTAL: 276 SUCCESS
Конфигурация:
module.exports = function(config) {
config.set({
basePath : 'www',
frameworks : [ 'jasmine' ],
files : [ 'js/*' ],
exclude : [ 'spec/lib/*.js' ],
reporters : [ 'progress', 'junit', 'html', 'coverage' ],
coverageReporter : {
type : 'html',
dir : 'coverage/'
},
preprocessors : {
'js/*.js' : 'coverage',
},
junitReporter : {
outputFile : 'test-results.xml'
},
colors : true,
logLevel : config.LOG_INFO,
autoWatch : true,
browsers : [ 'Firefox', 'Chrome' ],
captureTimeout : 20000,
reportSlowerThan : 500,
plugins : [ 'karma-jasmine', 'karma-coverage', 'karma-html-reporter', 'karma-chrome-launcher', 'karma-junit-reporter', 'karma-phantomjs-launcher', 'karma-firefox-launcher' ]
});
};