microsoft / microsoft/codecoverage

Code coverage shows line- 0 of n covered

Open
#182 5 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'm using Microsoft.CodeCoverage 17.14.1 and running the tests on Azure DevOps pipeline using the VSTest@2 task.
The CodeCoverage report is getting generated, and assemblies with the respective PDB's are present in the same directory.

The Target platform of test projects is .NET Framework v481, and tests are written in C# and have DLLs as test assemblies.
I've not added the reference of the Microsoft.NET.Test.Sdk to the test projects and haven't added the props and targets of the same.

The report says 0 lines covered out of n number of coverable lines.

Is it required to add the Microsoft.NET.Test.Sdk reference to my test projects to get the code coverage stuff working?
Is Microsoft.CodeCoverage 17.14.1 capable of covering the C# test assemblies' code coverage?

Does it need to have all PDB files on which test assemblies have references?, I mean the projects on which tests are being performed using test projects?

Logs.zip

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

Start with Logs.zip and the VSTest@2 pipeline configuration, then review how Microsoft.CodeCoverage 17.14.1 is used with C# .NET Framework 4.8.1 DLL test assemblies. Check the issue's questions about Microsoft.NET.Test.Sdk, referenced PDB files, and test-assembly setup; done means identifying the configuration requirement that explains the zero covered lines.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
ci-cd, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.