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

Improve code coverage for Microsoft.VisualBasic.dll (8.9%) #19615

Closed
danmoseley opened this issue Dec 8, 2016 · 20 comments
Closed

Improve code coverage for Microsoft.VisualBasic.dll (8.9%) #19615

danmoseley opened this issue Dec 8, 2016 · 20 comments
Labels
area-Microsoft.VisualBasic good first issue Issue should be easy to implement, good for first-time contributors help wanted [up-for-grabs] Good issue for external contributors increase-code-coverage Tracking need to add more test and increase code coverage of a component test-enhancement Improvements of test source code
Milestone

Comments

@danmoseley
Copy link
Member

There are almost zero tests so there is essentially zero code coverage.

@danmoseley danmoseley changed the title Improve code coverage for Microsoft.VisualBasic.dll Improve code coverage for Microsoft.VisualBasic.dll (0%) Dec 8, 2016
@stephentoub
Copy link
Member

There are almost zero tests

The only reason there aren't exactly zero is because if there were zero, it wouldn't show up in the code coverage report at all, so I added one test to help highlight how bad we are here ;)

@ghost
Copy link

ghost commented Feb 16, 2017

@stephentoub Well, that's pretty bad. ;) I could take this one. Is there an existing test codebase somewhere I could use as a starting point or do I have to start from scratch (I mean, from the one test you added :))?

@stephentoub
Copy link
Member

Thanks, @dennisdietrich. That's a nice offer. @VSadov, do you know if there are existing tests for this internally somewhere?

@danmoseley
Copy link
Member Author

Maybe from whatever repo @JeremyKuhne found the serial port tests recently.

@ghost
Copy link

ghost commented Feb 16, 2017

Sure thing. I'll hold of with coding until we get a response regarding the (non)exists of test code for the assembly but please feel free to assign this issue to me.

@VSadov
Copy link
Member

VSadov commented Feb 17, 2017

I will take a look if there is something salvageable.

@danmoseley
Copy link
Member Author

@VSadov any luck?

@danmoseley
Copy link
Member Author

Info on code coverage work:

  1. Here's the all up report
    https://ci.dot.net/job/dotnet_corefx/job/master/job/code_coverage_windows/Code_Coverage_Report/
    Caveat - doesn't show coverage of any types whose implementation is in corelib (eg String, etc). If you want to look at that for now you must gather manually using instructions below.

  2. Docs on code coverage work are here
    https://github.com/dotnet/corefx/blob/master/Documentation/building/code-coverage.md
    and some in
    https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md

  3. There's innumerable places to add coverage -- we would love to focus on the most heavily used types and the least covered types to get the most benefit.

OmarTawfik referenced this issue in dotnet/corefx Feb 13, 2018
#26744)

* Added tests for Microsoft.VisualBasic.CompilerServices.Conversions #14344

* added tests for ToBoolean fro Object
A-And referenced this issue in A-And/corefx Feb 21, 2018
…tnet#1… (dotnet#26744)

* Added tests for Microsoft.VisualBasic.CompilerServices.Conversions #14344

* added tests for ToBoolean fro Object
@pjanotti pjanotti changed the title Improve code coverage for Microsoft.VisualBasic.dll (0%) Improve code coverage for Microsoft.VisualBasic.dll (8.9%) Aug 10, 2018
@ehasis
Copy link
Contributor

ehasis commented Jul 22, 2019

I'm planing to contribute with this issue, but for some reason the there is no coverage (0 classes) for this assembly (actually Microsoft.VisualBasic.Core.dll). Any help in how to make code coverage show for this assembly?

@ehasis
Copy link
Contributor

ehasis commented Jul 22, 2019

@danmosemsft yes, I tried that. I also tried test with coverage on the entire repository, the report showed for all the other assemblies, except the VisualBasic one.

@danmoseley
Copy link
Member Author

@ViktorHofer is VB supposed to work? I would expect the tools to not be aware of the language used.

@ViktorHofer
Copy link
Member

Seems to be a coverlet bug:

Unable to instrument module: C:\git\corefx2\artifacts\bin\testhost\netcoreapp-Windows_NT-Debug-x64\shared\Microsoft.NETCore.App\5.0.0\Microsoft.VisualBasic.Core.dll because : Object reference not set to an instance of an object.

cc @MarcoRossignoli

@MarcoRossignoli
Copy link
Member

I'm OOF for a week I'll take a look asap @ViktorHofer please can you attach command line/project folder to speed up repro?

@ViktorHofer
Copy link
Member

Submitted coverlet-coverage/coverlet#495 to fix the crash.

@ViktorHofer
Copy link
Member

@ehasis that's the current code coverage status for Microsoft.VisualBasic.Core:

+----------------------------+--------+--------+--------+
| Module                     | Line   | Branch | Method |
+----------------------------+--------+--------+--------+
| Microsoft.VisualBasic.Core | 55.04% | 54.24% | 62.75% |
+----------------------------+--------+--------+--------+

+---------+--------+--------+--------+
|         | Line   | Branch | Method |
+---------+--------+--------+--------+
| Total   | 55.04% | 54.24% | 62.75% |
+---------+--------+--------+--------+
| Average | 55.04% | 54.24% | 62.75% |
+---------+--------+--------+--------+

HTML report:
report.zip

@ehasis
Copy link
Contributor

ehasis commented Jul 22, 2019

Very nice, thanks @ViktorHofer !

@MarcoRossignoli
Copy link
Member

Merged thanks Viktor

@ViktorHofer
Copy link
Member

Submitted dotnet/corefx#39728 to consume the new version.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@cston cston removed the untriaged New issue has not been triaged by the area owner label Jul 6, 2020
@cston
Copy link
Member

cston commented Jul 6, 2020

Closing. If we identify specific types in Microsoft.VisualBasic.Core that require additional test coverage, we can address those cases with specific issues.

@cston cston closed this as completed Jul 6, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Microsoft.VisualBasic good first issue Issue should be easy to implement, good for first-time contributors help wanted [up-for-grabs] Good issue for external contributors increase-code-coverage Tracking need to add more test and increase code coverage of a component test-enhancement Improvements of test source code
Projects
None yet
Development

No branches or pull requests

9 participants