Gathering detailed insights and metrics for karma-sonarqube-unit-reporter
Gathering detailed insights and metrics for karma-sonarqube-unit-reporter
Gathering detailed insights and metrics for karma-sonarqube-unit-reporter
Gathering detailed insights and metrics for karma-sonarqube-unit-reporter
karma-sonarqube-unit-reporter-pega
A pega modified Karma plugin. Report results in sonar-unit-tests xml format.
@tztz/karma-sonarqube-unit-reporter
A Karma plugin. Report results in sonar-unit-tests xml format.
karma-sonarqube-execution-reporter
A Karma plugin. Report execution results in sonar-unit-tests xml format.
@actually_connor/karma-sonarqube-unit-reporter
A Karma plugin. Report results in sonar-unit-tests xml format.
A Karma plugin. Unit tests execution report for SonarQube/Generic Coverage Plugin
npm install karma-sonarqube-unit-reporter
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
33 Stars
113 Commits
27 Forks
5 Watchers
13 Branches
15 Contributors
Updated on Jul 03, 2025
Minified
Minified + Gzipped
Latest Version
0.0.23
Package Id
karma-sonarqube-unit-reporter@0.0.23
Unpacked Size
20.99 kB
Size
6.19 kB
File Count
7
NPM Version
6.13.4
Node Version
12.14.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
1
Clear feedback. Just if you appreciate my efforts!
This solution is based on https://github.com/karma-runner/karma-junit-reporter .
Issue: https://github.com/karma-runner/karma-junit-reporter/issues/81
Available on npmjs.org https://www.npmjs.com/package/karma-sonarqube-unit-reporter
Sample karma.conf.ci.js
1'use strict'; 2 3var path = require('path'); 4var conf = require('./gulp/conf'); 5 6var _ = require('lodash'); 7var wiredep = require('wiredep'); 8 9var pathSrcHtml = [ 10 path.join(conf.paths.src, '/**/*.html'), 11 path.join(conf.paths.src_test, '/**/*.html') 12]; 13 14function listFiles() { 15 var wiredepOptions = _.extend({}, conf.wiredep, { 16 dependencies: true, 17 devDependencies: true 18 }); 19 20 return wiredep(wiredepOptions).js 21 .concat([ 22 path.join(conf.paths.src, '/app/**/*.module.js'), 23 path.join(conf.paths.src, '/app/**/*.js'), 24 path.join(conf.paths.src, '/**/*.spec.js'), 25 path.join(conf.paths.src, '/**/*.mock.js'), 26 path.join(conf.paths.src_test, '/app/**/*.module.js'), 27 path.join(conf.paths.src_test, '/app/**/*.js'), 28 path.join(conf.paths.src_test, '/**/*.spec.js'), 29 path.join(conf.paths.src_test, '/**/*.mock.js') 30 ]) 31 .concat(pathSrcHtml); 32} 33 34module.exports = function(config) { 35 36 var configuration = { 37 files: listFiles(), 38 39 singleRun: true, 40 41 colors: false, 42 43 autoWatch: false, 44 45 ngHtml2JsPreprocessor: { 46 stripPrefix: conf.paths.src + '/', 47 moduleName: 'TODO_PUT_HERE_YOUR_MODULE_NAME' 48 }, 49 50 logLevel: 'WARN', 51 52 frameworks: ['jasmine', 'angular-filesort'], 53 54 angularFilesort: { 55 whitelist: [path.join(conf.paths.src, '/**/!(*.html|*.spec|*.mock).js'), path.join(conf.paths.src_test, '/**/!(*.html|*.spec|*.mock).js')] 56 }, 57 58 browsers: ['PhantomJS'], 59 60 sonarQubeUnitReporter: { 61 sonarQubeVersion: 'LATEST', 62 outputFile: 'reports/ut_report.xml', 63 useBrowserName: false 64 }, 65 66 plugins: [ 67 'karma-phantomjs-launcher', 68 'karma-angular-filesort', 69 'karma-coverage', 70 'karma-jasmine', 71 'karma-ng-html2js-preprocessor', 72 'karma-sonarqube-unit-reporter' 73 ], 74 75 coverageReporter: { 76 type : 'lcov', 77 dir : 'reports', 78 subdir : 'coverage' 79 }, 80 81 reporters: ['progress', 'sonarqubeUnit', 'coverage'], 82 83 preprocessors: { 84 'src/**/*.js': ['coverage'], 85 'test/**/*.js': ['coverage'] 86 } 87 }; 88 89 config.set(configuration); 90};
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
},
sonarQubeUnitReporter: {
prependTestFileName: 'frontend' # This adds a string to the front of the generated file name in the report
# Useful if you run tests from within a subdirectory
}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 5/22 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
41 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More