karma-coverage icon indicating copy to clipboard operation
karma-coverage copied to clipboard

Coverage missing for multiple browsers configuration

Open yangchenyun opened this issue 10 years ago • 11 comments

Given the default setup for coverage reporter. The result is correct if I only specify one browser. screen shot 2013-08-07 at 8 58 26 pm

When I specify multiple browsers for karma to run, istanbul generates the correct coverage folder structure and files but lack the analytic data. screen shot 2013-08-07 at 8 57 31 pm

yangchenyun avatar Aug 07 '13 12:08 yangchenyun

I just briefly looked into it, git bisect says it was caused by https://github.com/karma-runner/karma-coverage/commit/4a9afb6255aa6029dae8d71d5349a92de19a7439

vojtajina avatar Aug 08 '13 20:08 vojtajina

@abierbaum any chance you could look into it ?

vojtajina avatar Aug 08 '13 20:08 vojtajina

When you specify multiple browsers, it seems to output the results for only one browser, and not the same one consistently. For me it started outputting Chrome, but now it has switched to outputting FF and Chrome is empty.

mbielski avatar Aug 09 '13 16:08 mbielski

And even the one browser output is in complete.

yangchenyun avatar Aug 10 '13 09:08 yangchenyun

This just bit me as well. I changed my config to match the config style in the commit mentioned by @vojtajina and tt's still randomly deciding which browser to actually report coverage for.

lord2800 avatar Oct 26 '13 02:10 lord2800

Any update or possible workaround? Thanks!

FabienDeshayes avatar Dec 02 '13 15:12 FabienDeshayes

I have reverted reporter.js to this version: 5eca4882ce4ea736283b0ac8e7c38f1051230a57. It worked!

scriptboykiller avatar Dec 16 '13 07:12 scriptboykiller

Same issue here... Only the last browser that finishes has coverage data.

saadtazi avatar Jan 20 '14 17:01 saadtazi

any updates here? It seems as if i have the same issue but this one is quiet old.

Xiphe avatar May 13 '15 15:05 Xiphe

The issue continues in version 1.1.1 I have two browser configuration: 1 mobile, 1 desktop. Mobile execute some specialized code, and the code coverage report it just sometimes. I would like to the report to be merged. My conf:

browsers: [
  'Chrome_desktop'
  ,'Chrome_mobile'
],

customLaunchers: {
  Chrome_desktop: {
    base: 'Chrome',
    flags: ['--window-size=1024,768']
  },
  Chrome_mobile: {
    base: 'Chrome',
    flags: ['--window-size=320,600']
  }
},

bedorlan avatar Aug 31 '16 21:08 bedorlan

Seems something similar happens when I run multiple processes in parallel. I only get a coverage report for the last one.

skyl avatar May 04 '18 19:05 skyl