I am trying to get the karmic runner to produce the Corbettura Format Code coverage report during Jenkins Build. I can get it to generate an coverage.xml file, but it does not actually contain any coverage data (using the There are pieces related to my (Junit report is generating a fine.) Apparently I had thought more literally than my (note the earlier LOG_DEBUG ) that the preprocessor coverage is not running .
karma.conf.js file:
files = [Jasmine, JASMINE_ADAPTER, 'App / components / angle / Angular Js ',' ap / factor / angular-socks / angular-mocks.js ',' tmp / script / ** /*.js ',' tmp / spec / ** / *. Js']; Preprocessor = {'TMP / Script / ** / *. JS ':' coverage '}; // test result reporter // to use possible values: 'dots', 'progress', 'junit' journalists = ['dots', 'junit', 'coverage']; JunitReporter = {outputFile: 'test-results.xml'}; CoverageReporter = {Type: 'Cobertura', DIR: 'Coverage /', File: 'Coverage. Xml '};
preprocessor configuration
preprocessors = {'** / tmp / script / ** / *. JS: 'Coverage'};
** / ) did the trick. I'm not sure why syntax is different for
files array and
preprocessor object (
'tmp / scripts / ** / * .js' Vs
'** / tmp / scripts / ** / *. Js' ).
Sunday, 15 August 2010
How to setup Karma runner code coverage? -
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment