Cobertura coverage not appearing in merge request

Similar/same issues:

I am unable to see code coverage in Add more tests (!159) · Merge requests · Taylor Smock / Mapillary · GitLab . From #54798, one of the questions asked was “what does the coverage_reports.json look like”:

$ curl 'https://gitlab.com/smocktaylor/Mapillary/-/merge_requests/159/coverage_reports.json' | jq '.files."src/main/java/org/openstreetmap/josm/plugins/mapillary/cache/Caches.java"'
{
  "45": 2,
  "46": 2,
  "49": 2,
  "50": 2,
  "53": 2,
  "54": 2,
  "55": 2,
  "56": 2,
  "57": 2,
  "58": 2,
  "59": 2,
  "61": 2,
  "69": 2,
  "70": 2,
  "71": 2,
  "73": 2,
  "74": 2,
  "75": 2,
  "76": 2,
  "77": 2,
  "80": 2,
  "81": 2,
  "82": 0,
  "83": 0,
  "85": 2,
  "98": 2,
  "109": 2,
  "110": 2,
  "111": 2,
  "112": 2,
  "114": 0,
  "116": 2,
  "124": 0,
  "125": 0,
  "134": 2,
  "144": 2,
  "145": 2,
  "155": 0,
  "156": 0,
  "158": 0,
  "171": 0,
  "172": 0,
  "174": 0,
  "187": 2,
  "188": 0,
  "190": 2,
  "191": 2,
  "194": 2,
  "195": 2,
  "196": 2,
  "197": 2,
  "198": 2,
  "199": 2,
  "200": 2,
  "201": 2,
  "202": 2,
  "203": 2,
  "204": 2,
  "205": 2,
  "206": 2,
  "208": 2,
  "209": 2,
  "219": 2,
  "220": 2,
  "221": 2,
  "222": 2,
  "223": 2,
  "224": 2,
  "225": 2,
  "227": 2,
  "228": 2,
  "229": 2,
  "235": 0,
  "247": 0,
  "248": 0,
  "250": 0,
  "259": 2
}

Coverage information is there, but it isn’t being used/shown.

1 Like

@smocktaylor Welcome to the forum and thanks for the post! I see both the test coverage visualization and coverage data in the MR Widget on the linked merge request. I confirmed on Chrome (screenshots below) and Safari on my OSX machine. Can you add some details on what you’re expecting to see and what you are not or maybe a screenshot? Thanks!

-James H, GitLab Product Manager, Verify:Testing


Screenshot of Firefox 90 on Mac OS X (11.5.1). Maybe it is a Firefox specific bug?

EDIT: It does appear to work in Chrome, but not in Safari for me.

EDIT 2: After loading it in Chrome, it started loading in Safari/Firefox for me. No clue why that happened (first time loading in Safari didn’t work – almost literally first time opening Safari in months, so no cache, hard reloading Safari/Firefox got it to show up, again after Google Chrome load).

@smocktaylor glad to hear it’s working. It can take some time to load that artifact the first time and the visualization to show on the page. We have an open issue to try out a different parser to improve performance.

-James H, GitLab Product Manager, Verify:Testing

1 Like

Good to know. I’ll keep that in mind for the future (it does seem like it should be in the documentation – i.e., a 30mb file will take 10 minutes to load in Gitlab xx, or something like that).

I’ll have to doublecheck the file size, but it shouldn’t be too large (I’d expect that repo to be maybe 1-2 mb for coverage data).

EDIT: Now that I think about it, I suspect there is a queue on the backend, so if some users have larger coverage files, then other users have to wait behind those larger files.

1 Like