joeljeske / karma-parallel

A Karma JS Framework to support sharding tests to run in parallel across multiple browsers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to enable running tests in parallel on CI

VictorSholomickiy opened this issue · comments

How to enable running tests in parallel on CI? I am running tests with 2 executors, but got one...
This is my karma config: ``` module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['parallel', 'jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
require('karma-junit-reporter'),
require('karma-parallel'),
],
parallelOptions: {
executors: 2,
shardStrategy: 'round-robin'
},
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
captureTimeout: 60000,
browserDisconnectTolerance: 1,
browserDisconnectTimeout : 60000,
browserNoActivityTimeout : 60000,
mime: {
'text/x-typescript': ['ts', 'tsx']
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, 'testOutput/coverage'),
reports: ['html', 'lcovonly', 'cobertura'],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev',
codeCoverage: true
},
reporters: config.angularCli && config.angularCli.codeCoverage ?
['dots', 'junit', 'progress', 'coverage-istanbul'] :
['dots', 'junit', 'progress', 'kjhtml'],
junitReporter: {
outputFile: require('path').join(__dirname, 'testOutput/test-results.xml'),
},
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['ChromeHeadless'],
singleRun: false
});
};