Closed ThaKing closed 7 years ago
Unfortunately this is not possible since the required information (path to the executed test file) is not passed to this plugin.
karma-sonarqube-unit-reporter\index.js#115: this.specSuccess = this.specSkipped = this.specFailure = function (browser, result) {
This method is some kind of entry point to this plugin where browser is a reference to headless browser instance (in my case) and result has the following content:
Object
description: "invokes specific url"
id: "spec0"
log: Array[0]
skipped: false
success: true
suite: Array[2]
0: "test\app\components\applicationinfo\applicationinfo.service.spec.js"
1: "getApplicationInfo function invokes $http"
length: 2
time: 32
where suite[0] is the top level describe, suite[1] is the nested one and description equals to the it.
Hello
I pushed it to jasmise framework here: https://github.com/jasmine/jasmine/issues/1256
For mocha, the information is already present here, if I read that correctly: https://github.com/mochajs/mocha/pull/1222
Perhaps it could be nice to prepare this...
Investigating
"describe('test/unit/some/someTest.js', function() {}"
for 'ut_report.xml' in file tag
<unitTest version="1">
<file path="test/unit/someTest.js"> <------ should paste from describe in test
<testCase name="Some Test ..." duration="18"/>
</file>
</unitTest>
Could it be possible to auto generate this
'<file path="test/unit/someTest.js">'
in ut_report.xml despite on describe in test?