coverlet icon indicating copy to clipboard operation
coverlet copied to clipboard

Unable to instrument the project when moved

Open mklemarczyk opened this issue 3 years ago • 4 comments

Hello,

Problem description

I have an issue using coverlet and xUnit to test and compute coverage on .NET Framework 4.8 project. (I use the coverlet console as entry point) The coverlet works properly when project is build and than tested.

The issue is about no coverage computed when the project is moved after the build. The context is for multi-agent setup in Azure DevOps, where the location of the source, binaries and tests are located based on agent name and build number.

Diagnostic

I found by debugging the source code that coverlet is not able to find the pdb files.

The locations that are searched is PDB embeded in dll module, and original build location. The build location mapping is not available to coverlet console. :(

Unfortunately there is not log message even with detailed mode to see that problem.

Possible solution

I will propose solution to this issue later today. It is to extend the search locations for pdb files, as those are usually located next to the dll module file for .NET Framework projects.

Context:

  • Build agents Azure DevOps,
  • OS: Windows 10 64 bit,
  • Coverlet: 5.7.2,
  • xUnit: 2.4.1,
  • .NET stack: .NET Framework 4.8

mklemarczyk avatar Jun 20 '22 09:06 mklemarczyk

Yep coverlet needs PDB metadata to instrument and calculate the report. I'll review the PR thanks

MarcoRossignoli avatar Jun 24 '22 08:06 MarcoRossignoli

Thank you for the integration :) @MarcoRossignoli, do you know when is planned next release? It was a while since last one in February.

mklemarczyk avatar Jul 02 '22 08:07 mklemarczyk

There's no ETA yet, we don't have strict schedule, for now you can give it a try using the dogfood and let us now if it's working as expected https://github.com/coverlet-coverage/coverlet#Consume-nightly-build

MarcoRossignoli avatar Jul 04 '22 08:07 MarcoRossignoli

Hello @MarcoRossignoli, sorry for the late response. We tested well the nightly release. It works now as expected. We wait the official release of coverlet with changes, to be able to integrate it the production pipeline.

mklemarczyk avatar Aug 02 '22 16:08 mklemarczyk

We have some issue with pipeline as soon will be fixed we'll release.

I'm closing this one cause solved.

MarcoRossignoli avatar Sep 28 '22 08:09 MarcoRossignoli