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

Question - Should there be / will there be branch coverage for C++ projects ? #22

Open
tonyhallett opened this issue Sep 22, 2022 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@tonyhallett
Copy link

Using the nuget package https://www.nuget.org/packages/Microsoft.CodeCoverage/ and pointing into it with runsettings

    <TestAdaptersPaths>thepath\17.3.1\build\netstandard1.0</TestAdaptersPaths>
  <DataCollectionRunSettings>
    <DataCollectors>
      <DataCollector friendlyName="Code Coverage" enabled="True">
@jakubch1
Copy link
Member

jakubch1 commented Dec 5, 2022

Currently we support only C# (cobertura format) and C++ branch coverage is not supported.
We do support line and block coverage. Essentially, we split C++ binary into blocks [block is list of instructions without any jump etc.] and add probe for each block. So having 100% block coverage means you covered all your instructions. This is not telling you if you reach each instruction from all possible places (through jumps etc.) and if all conditions had both values.

We don't have plans to add this at the moment. Please create ticket also here: https://developercommunity.visualstudio.com/home
If we see more people interested, we can consider adding this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants