In-process code coverage collection #1359
Replies: 1 comment
-
Depends on how you want to provide the code coverage, you have 2 way static instrumentation(write the assemblies before to run) and dynamic instrumentation(use a .NET native profiler and instrument IL on the fly). Another way is to start your test under a coverage and for that you can use the coverlet global tool(for static instrumentation) https://github.com/coverlet-coverage/coverlet#net-global-tool-guide-suffers-from-possible-known-issue or the MS provided one(dynamic) https://learn.microsoft.com/en-us/dotnet/core/additional-tools/dotnet-coverage |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am writing a very small test-framework for C#, mostly as a fun exercise. 🙂
I wanted to add code coverage, somehow - am I correct to think that this is not something the platform SDK itself provides, and this library is essentially the best/only/closest thing to an "official" option for that?
Would the
CoverletInProcDataCollector
be the simplest/most appropriate facility to achieve that?There is no inline documentation, and I don't see an example, nor any usages in any code I could find online.
How would I begin to use this?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions