coverlet-coverage / coverlet

Cross platform code coverage for .NET
MIT License
2.97k stars 386 forks source link

What is "XPlat Code Coverage" #1065

Closed stricq closed 3 years ago

stricq commented 3 years ago

I looked through the documentation and I could not anyplace that explains what "XPlat Code Coverage" is or even why it was needed.

petli commented 3 years ago

As I understand it it is just how to tell the underlying vstest driver to activate coverlet.collector to collect coverage information during test runs. It is not something that's designed by Coverlet, but by vstest. There's full documentation on how coverlet interacts with vstest on this page: https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md

MarcoRossignoli commented 3 years ago

Yep @petli is correct "XPlat Code Coverage" is handled by VSTest plat to inject our collectors.

Take a look here https://github.com/microsoft/vstest/blob/master/src/vstest.console/Processors/CollectArgumentProcessor.cs#L253

voroninp commented 1 year ago

Is there any alias or another way to reference collector with something what does not contain spaces?

I've run into a TC's issue.

MarcoRossignoli commented 1 year ago

Unfortunately not, you should have a way to escape the "

voroninp commented 1 year ago

Single quotes are also working!

voroninp commented 1 year ago

Ah, no =( They do not. But runsettings file does ;-) Anyway, there's a way to get what I need.