Closed groie closed 8 years ago
Hi Groie,
%project%/test/app/components/applicationinfo/applicationinfo.service.spec.js:
(function() {
'use strict';
describe('test\\app\\components\\applicationinfo\\applicationinfo.service.spec.js', function() {
var applicationInfoService;
var $rootScope;
describe('getApplicationInfo function invokes $http', function() {
...
thus the utreport.xml will be something like this:
<unitTest version="1">
<file path="test/app/components/applicationinfo/applicationinfo.service.spec.js">
<testCase name="test\app\components\applicationinfo\applicationinfo.service.spec.js getApplicationInfo function invokes $http invokes specific url" duration="39"/>
...
I know it is far from perfect but maybe will answer your question.. but might not solve your issue. Please let me know... :)
I have a large existing base of Karma tests I'd like to display in SonarQube, thus this approach is not especially helpful. I think we'll build our own version of a Jasmine Reporter that exports parses and exports the filenames properly.
Hi, It seems that with my jasmine/karma tests the generic coverage file ends up being composed falsely. The value of "path" ends up being the value of the topmost describe block. This unfortunately does not work with SonarQube as sonar expects to get the actual path and filename.
Are you using the filename+path as the value for the topmost describe block for each testfile, or how did you get this to work?