Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mmouterde/mocha-sonarqube-reporter
mocha reporter for sonar (>6.2)
https://github.com/mmouterde/mocha-sonarqube-reporter
mocha reporter sonar
Last synced: 2 months ago
JSON representation
mocha reporter for sonar (>6.2)
- Host: GitHub
- URL: https://github.com/mmouterde/mocha-sonarqube-reporter
- Owner: mmouterde
- License: mit
- Created: 2017-03-27T08:30:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-12T14:47:30.000Z (over 2 years ago)
- Last Synced: 2024-11-06T17:53:01.929Z (2 months ago)
- Topics: mocha, reporter, sonar
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 8
- Watchers: 4
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mocha-sonarqube-reporter
mocha unit test reporter for sonar (>6.2)
inspired from :
- [qingguo-yu/mocha-sonar-generic-test-coverage-file](https://github.com/qingguo-yu/mocha-sonar-generic-test-coverage-file)
- [mageddo/mocha-sonar-generic-test-coverage](https://github.com/mageddo/mocha-sonar-generic-test-coverage)According to [this page](https://docs.sonarqube.org/display/PLUG/Generic+Test+Coverage), Sonar (> 6.2) not longer use 'generic test coverage',
but ['generic Test Data'](https://docs.sonarqube.org/display/SONAR/Generic+Test+Data).
This reporter provides the new compliant XML structure.Usage
-----Install and save to your `devDependencies`
```
npm install --save-dev mocha-sonarqube-reporter
mocha --reporter mocha-sonarqube-reporter testFolder --reporter-options output=xunit.xml
```On **mocha-test** for use with grunt
mochaTest: {
sonar: {
options: {
reporter: 'mocha-sonarqube-reporter',
quiet: true,
reporterOptions:{
output : 'unit-tests.xml' // default to ./xunit.xml
useFullFilePath: 'true' // default to 'false'. Uses full test file paths in the report.
}
},
src: [
'app/**/*.spec.js'
]
}
}# Output example
```xml
other
stacktrace
stacktrace
```
LICENSE
-------Licensed under the MIT license.