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

Need code coverage run for Unix #20620

Closed
danmoseley opened this issue Mar 14, 2017 · 17 comments
Closed

Need code coverage run for Unix #20620

danmoseley opened this issue Mar 14, 2017 · 17 comments
Labels
area-Meta enhancement Product code improvement that does NOT require public API changes/additions increase-code-coverage Tracking need to add more test and increase code coverage of a component os-linux Linux OS (any supported distro) tenet-reliability Reliability/stability related issue (stress, load problems, etc.)
Milestone

Comments

@danmoseley
Copy link
Member

No description provided.

@stephentoub
Copy link
Member

Need code coverage run for Unix

First we need a code coverage tool that works on Unix.
https://github.com/dotnet/coreclr/issues/445#issuecomment-277821044

@danmoseley
Copy link
Member Author

Ah - I would say this is very much Future then.
Ideally we would have a way to diff Windows and Unix coverage, I can think of some ways that could be useful.

@geoffkizer
Copy link
Contributor

This is really important. I've been working on our Linux socket implementation (which is very different than Windows) and there are definite testing gaps. It's really hard to have confidence in our testing when we have no code coverage. I hope we can get this done for 2.1.

@SteveGilham
Copy link

In the days before OpenCover being available for .net4, I used this instrumenting tool as a stopgap for the coverage gathering I was doing at work. Rather than making use of the profiler API to inject instrumentation at run-time, it pre-instruments the assemblies with similar IL instead. The code ended up on Google Code, from whence I salvaged it, mainly for archival purposes.

It may be that it can serve the same stop-gap role here.

@Kantuz001
Copy link

Any news?

@SteveGilham
Copy link

Blowing my own trumpet here, but if you need something right now, following my comment from last August, I've dusted off my old project AltCover that does the instrumentation by weaving the extra IL as a separate step (based on the one I cited above), and that does work on .net framework, .net core, and Mono, on Windows and (at least) Linux. Line coverage only in classic NCover format, at the moment.

@pjanotti
Copy link
Contributor

We are currently experimenting with coverlet. Instructions here: https://github.com/dotnet/corefx/blob/master/Documentation/building/code-coverage.md#cross-platform-coverage

@stephentoub
Copy link
Member

@ViktorHofer, should this be closed, or if not, what's still needed?

@ViktorHofer
Copy link
Member

Unix coverage runs are working now. This can be closed. We have other issues that are tracking adding a AzDO run.

@rgl
Copy link

rgl commented Jul 22, 2019

@ViktorHofer can you please update us in how that is working now? this ended up being coverlet?

@ViktorHofer
Copy link
Member

This is documented here: https://github.com/dotnet/corefx/blob/master/Documentation/building/code-coverage.md#local-code-coverage-runs

It is using coverlet and ReportGenerator repo tools for code coverage measurement and to generate an HTML report. Feel free to ping me for additional questions.

@rgl
Copy link

rgl commented Jul 22, 2019

@ViktorHofer I did see that page, but since this issue still said it was experimental, I was in doubt if that page was the final version. Now I known its really using coverlet. Thank you for the explanation!

BTW, will this end up in dotnet core 3?

@ViktorHofer
Copy link
Member

BTW, will this end up in dotnet core 3?

Will what end-up in .NET Core 3?

@rgl
Copy link

rgl commented Jul 22, 2019

The code-coverage/coverlet/tooling support for gathering code coverage under unix/linux.

@ViktorHofer
Copy link
Member

Coverlet offers that already. We don't offer an in-built tools as part of the BCL. Coverlet was recently integrated into dotnet test. Not sure if I understand your question correctly.

@rgl
Copy link

rgl commented Jul 22, 2019

that was it! all of this (coverlet/bcl/dotnet test) will work with dotnet core 3. :-)

@ViktorHofer
Copy link
Member

Absolutely 👍

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 5.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Meta enhancement Product code improvement that does NOT require public API changes/additions increase-code-coverage Tracking need to add more test and increase code coverage of a component os-linux Linux OS (any supported distro) tenet-reliability Reliability/stability related issue (stress, load problems, etc.)
Projects
None yet
Development

No branches or pull requests

9 participants