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-reporter
A karma reporter plugin for generating Sonarqube generic test reports
mocha-sonarqube-reporter
mocha reporter for sonar (>6)
karma-jasmine-html-reporter
A Karma plugin. Dynamically displays tests results at debug.html page
karma-htmlfile-reporter
A Karma plugin. Report results in styled html format.
npm install karma-sonarqube-unit-reporter
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
33 Stars
113 Commits
28 Forks
6 Watching
13 Branches
15 Contributors
Updated on 21 Apr 2023
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-1.9%
7,421
Compared to previous day
Last week
0.4%
36,569
Compared to previous week
Last month
4.7%
156,421
Compared to previous month
Last year
-1.6%
1,777,195
Compared to previous year
1
1
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
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
39 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
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