Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.2.5 release broke cobertura reports #91

Closed
mokkabonna opened this issue Jul 29, 2014 · 17 comments · Fixed by #92
Closed

0.2.5 release broke cobertura reports #91

mokkabonna opened this issue Jul 29, 2014 · 17 comments · Fixed by #92

Comments

@mokkabonna
Copy link

Here is my relevant config

reporters: ['progress', 'coverage'],
...
coverageReporter: {
  reporters: [{
    type: 'cobertura',
    dir: '.tmp/coverage-report/'
  }, {
    type: 'json',
    dir: 'coverage/'
  }]
},

Reverting to 0.2.4 fixes the issue.

@mokkabonna
Copy link
Author

Switching to a single reporter seems to work fine:

coverageReporter: {
  type: 'cobertura',
  dir: '.tmp/coverage-report/'
},

@drublic
Copy link

drublic commented Jul 29, 2014

Same here. I don't get the report within the correct folder.

@gcpantazis
Copy link

Also seeing this with multiple coverage reporters.

@deuvarney
Copy link

Same here. It was working fine for my multiple reports for 0.2.4 when i specified which directory the reports should appear in, now all the reports appear in a coverage directory relative to the base path with 0.2.5

@paulwib
Copy link

paulwib commented Jul 31, 2014

Same here. Getting reports, but not in the correct dir.

@aymericbeaumet
Copy link
Member

Hey guys,

thanks for reporting the bug. This regression has been introduced when I refactored the code to support the subdir option as I didn't take in consideration that it could be several reporters attached 👎.

You can switch back to 0.2.4 until I fix it.

@aymericbeaumet aymericbeaumet self-assigned this Jul 31, 2014
@MilanLempera
Copy link

Problem is probably only using variable config for resolveOutput directory on https://github.com/karma-runner/karma-coverage/blob/master/lib/reporter.js#L127.

reporterConfig is correct variable.

aymericbeaumet added a commit that referenced this issue Jul 31, 2014
The `subdir` option previously introduced in karma-coverage-reporter 0.2.5
brings an issue: it wasn't possible anymore to configure a specific output
directory for each reporter. This fix makes it possible again.

Fix #91
aymericbeaumet added a commit that referenced this issue Jul 31, 2014
The `subdir` option previously introduced in karma-coverage-reporter 0.2.5
brings an issue: it wasn't possible anymore to configure a specific output
directory for each reporter. This fix makes it possible again.

Fix #91
@aymericbeaumet
Copy link
Member

Ok guys it should be fixed on the fix-individual-dir-subdir branch. If would be nice if some of you could give it a shot and give me a feedback:

npm install 'git://github.com/karma-runner/karma-coverage.git#fix-individual-dir-subdir'

@MilanLempera
Copy link

yes, now it works fine. Thanks for the quick fix

aymericbeaumet added a commit that referenced this issue Aug 1, 2014
The `subdir` option previously introduced in karma-coverage 0.2.5 brings an
issue: it wasn't possible anymore to configure a specific output directory for
each reporter. This fix makes it possible again.

Fix #91
aymericbeaumet added a commit that referenced this issue Aug 1, 2014
The `subdir` option previously introduced in karma-coverage 0.2.5 brings a
regression: it wasn't possible anymore to configure a specific output
directory/subdirectory for each reporter. This fix makes it possible again.

Fix #91
@aymericbeaumet
Copy link
Member

Ok guys, the patch should be soon published on NPM (tag 0.2.6).

@dmaevac
Copy link

dmaevac commented Aug 3, 2014

Tag doesnt seem to have been pushed? 0.2.6 not shown on github or npm.

@aymericbeaumet
Copy link
Member

I'll look into it.

@aymericbeaumet
Copy link
Member

The machine automatically releasing the new versions is currently down. It should be restarted today. Don't hesitate to ping this thread if no NPM pushes happen.

@mdumrauf
Copy link

mdumrauf commented Jan 8, 2015

Still present in 0.2.7. My coverageReporter in karma.config.js looks like this:

    coverageReporter: {
      dir: 'coverage/',
      reporters: [
        { type: 'html', subdir: 'report-html' },
        { type: 'text', subdir: '.', file: 'text.txt' },
        { type: 'text-summary', subdir: '.', file: 'text-summary.txt' }
      ]
    },

The reports are generated successfully, but no data is output.

@mdumrauf
Copy link

mdumrauf commented Jan 9, 2015

Never mind. I just realized that if don't specify subdir and file, they get output.

    coverageReporter: {
      dir: 'coverage/',
      reporters: [
        { type: 'html', subdir: 'report-html' },
        { type: 'text' },
        { type: 'text-summary' }
      ]
    },

Maybe the docs should be more accurate about this, and also sometimes I would like to have the output on both a file and console.

@aymericbeaumet
Copy link
Member

That's weird, I think your first configuration should work. I will look into it.

@nerdgore
Copy link

I can confirm that with the update from 0.2.6 to 0.2.7 karma-coverage now ignores the subdir setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants