microsoft / microsoft/codecoverage

[cobertura] Missing branch coverage when all branches are covered

Open
#104 34 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
125
Forks
17
Avg merge
1h 17m
Merged PRs (30d)
2

Description

I have two test projects which are running on seperate ci nodes because of different requirements.
So i get two coverage files which i like to import in jenkins reports.

The code:

else if (ambiguous && founds == 1)

Project a, which fully covers that line gives:

<line number="61" hits="1" branch="True" />

Project b doesn't cover that line (which is expected) and gives:

<line number="61" hits="0" branch="True" condition-coverage="0% (0/4)">
  <conditions>
    <condition number="0" type="jump" coverage="0%" />
    <condition number="1" type="jump" coverage="0%" />
  </conditions>
</line>

Both reports should be identical beside coverage values.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Begin by reproducing the two Cobertura XML outputs from the C# branch example and review the coverage-report handling, using JENKINS-72757 for context. Done means the reports have matching branch metadata apart from coverage values.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.