Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
karma-sonarqube-execution-reporter
Advanced tools
A Karma plugin. Report execution results in sonar-unit-tests xml format.
This solution is based on https://github.com/tornaia/karma-sonarqube-unit-reporter
Issue: karma-sonarqube-unit-reporter has problem with putting correct path
attribute in file
tag.
Available on npmjs.org https://www.npmjs.com/package/https://github.com/lisrec/karma-sonarqube-execution-reporter
Sample karma.conf.ci.js
'use strict';
var path = require('path');
var conf = require('./gulp/conf');
var _ = require('lodash');
var wiredep = require('wiredep');
var pathSrcHtml = [
path.join(conf.paths.src, '/**/*.html'),
path.join(conf.paths.src_test, '/**/*.html')
];
function listFiles() {
var wiredepOptions = _.extend({}, conf.wiredep, {
dependencies: true,
devDependencies: true
});
return wiredep(wiredepOptions).js
.concat([
path.join(conf.paths.src, '/app/**/*.module.js'),
path.join(conf.paths.src, '/app/**/*.js'),
path.join(conf.paths.src, '/**/*.spec.js'),
path.join(conf.paths.src, '/**/*.mock.js'),
path.join(conf.paths.src_test, '/app/**/*.module.js'),
path.join(conf.paths.src_test, '/app/**/*.js'),
path.join(conf.paths.src_test, '/**/*.spec.js'),
path.join(conf.paths.src_test, '/**/*.mock.js')
])
.concat(pathSrcHtml);
}
module.exports = function(config) {
var configuration = {
files: listFiles(),
singleRun: true,
colors: false,
autoWatch: false,
ngHtml2JsPreprocessor: {
stripPrefix: conf.paths.src + '/',
moduleName: 'TODO_PUT_HERE_YOUR_MODULE_NAME'
},
logLevel: 'WARN',
frameworks: ['jasmine', 'angular-filesort'],
angularFilesort: {
whitelist: [path.join(conf.paths.src, '/**/!(*.html|*.spec|*.mock).js'), path.join(conf.paths.src_test, '/**/!(*.html|*.spec|*.mock).js')]
},
browsers: ['PhantomJS'],
sonarQubeUnitReporter: {
sonarQubeVersion: 'LATEST',
outputFile: 'reports/ut_report.xml',
useBrowserName: false
},
plugins: [
'karma-phantomjs-launcher',
'karma-angular-filesort',
'karma-coverage',
'karma-jasmine',
'karma-ng-html2js-preprocessor',
'karma-sonarqube-unit-reporter'
],
coverageReporter: {
type : 'lcov',
dir : 'reports',
subdir : 'coverage'
},
reporters: ['progress', 'sonarqubeUnit', 'coverage'],
preprocessors: {
'src/**/*.js': ['coverage'],
'test/**/*.js': ['coverage']
}
};
config.set(configuration);
};
By default, the description of the jasmine tests used as the path attribute in the generated xml. If this is not the case with your tests, you can use the following options to automagically find the right path values. It is the recommended way to use this plugin but to be backward compatible it is not enabled by default.
sonarQubeUnitReporter: {
sonarQubeVersion: 'LATEST',
outputFile: 'reports/ut_report.xml',
overrideTestDescription: true,
testPaths: ['./test', './moreTests'],
testFilePattern: '.spec.js',
useBrowserName: false
},
0.0.2 (2018-11-22)
FAQs
A Karma plugin. Report execution results in sonar-unit-tests xml format.
The npm package karma-sonarqube-execution-reporter receives a total of 927 weekly downloads. As such, karma-sonarqube-execution-reporter popularity was classified as not popular.
We found that karma-sonarqube-execution-reporter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.