karma-runner / karma-runner/karma-coverage

Karma coverage and istanbul-combine

Open
#350 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
771
Forks
242
PR merge metrics
No merged PRs in 30d

Description

Hi,
first of all, i think there is no bug it this, but maybe is only wrong documented or described feature.
I have a problem with json coverage report. We have thousand of tests so we are running lots of parallel test suits and after end of every suit we generate json file with coverage.

So in first test suit is json with this paths:
```
C:\\GitLab-Runner\\builds\\f53ae3e4\\3\\project\\module\\file1.js
C:\\GitLab-Runner\\builds\\f53ae3e4\\3\\project\\module\\file2.js
```

But in other suit there are paths like this
```
C:\\GitLab-Runner\\builds\\g58749\\0\\project\\module\\file1.js
C:\\GitLab-Runner\\builds\\g58749\\0\\project\\module\\file2.js
```

If i use istanbul-combine that gives me total wrong summary number because of absolute paths not match and file1.js from first run is not same as in other runs for istanbul-combine.

Is there possiblity to use relative paths in json coverage report or is there another solution for this?
Thanks for quick response!

Contributor guide

Open the contributing guide

Research direction

Review how the Karma coverage plugin produces JSON coverage paths and how istanbul-combine matches them. Reproduce the parallel-suite case using the differing Windows paths shown here, then determine a supported way to make paths consistent. Done means combined coverage attributes both runs to the same files or the behavior is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.