Skip to content

Commit 48345f5

Browse files
committed
【update】sonar ut report review by xiongjj
1 parent 951d566 commit 48345f5

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"karma-cli": "^2.0.0",
9494
"karma-coverage": "^2.0.1",
9595
"karma-jasmine": "^2.0.1",
96+
"karma-sonarqube-unit-reporter": "0.0.21",
9697
"karma-teamcity-reporter": "^1.1.0",
9798
"mock-socket": "^9.0.2",
9899
"nightwatch": "^1.3.1",

test/karma.conf.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ module.exports = function (config) {
112112
// test results reporter to use
113113
// possible values: 'dots', 'progress'
114114
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
115-
reporters: ['progress', 'coverage', 'teamcity'],
115+
reporters: ['progress', 'sonarqubeUnit', 'coverage', 'teamcity'],
116116

117117
//最大超时时间
118118
captureTimeout: 120000,
@@ -124,9 +124,12 @@ module.exports = function (config) {
124124
reporters: [
125125
{type: 'lcov', subdir: '.'}
126126
]
127-
}
128-
,
129-
127+
},
128+
sonarQubeUnitReporter: {
129+
sonarQubeVersion: 'LATEST',
130+
outputFile: 'testcoverage/ut_report.xml',
131+
useBrowserName: false
132+
},
130133
// web server port
131134
port: 9876,
132135

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy