ademanuele / vsmac-codecoverage Goto Github PK
View Code? Open in Web Editor NEWA Visual Studio for Mac code coverage extension.
License: MIT License
A Visual Studio for Mac code coverage extension.
License: MIT License
Our Xamarin project generates 0% coverage after running more than 2600 Unit tests. Are we missing something in our unit test, to correctly display coverage? We are using Nunit test framework.
If build was failure this plugin freeze until restart plugin (turn off then turn on). Restarting VS doesn't help
When I click add repository and paste the url Could not get information from repository: https://raw.githubusercontent.com/ademanuele/VSMac-Extensions/master/main.mrep.
I am getting this error
Exception occurred: Nullable object must have a value.
System.InvalidOperationException: Nullable object must have a value.
at System.Nullable`1[T].get_Value () [0x0000d] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/Nullable.cs:48
at Mono.Addins.Setup.HttpClientDownloadFileRequest.get_ContentLength () [0x00000] in /Users/builder/azdo/_work/1/s/main/external/mono-addins/Mono.Addins.Setup/Mono.Addins.Setup/DownloadFileRequest.cs:77
at Mono.Addins.Setup.AddinStore.DownloadFile (Mono.Addins.IProgressMonitor monitor, System.String url) [0x00117] in /Users/builder/azdo/_work/1/s/main/external/mono-addins/Mono.Addins.Setup/Mono.Addins.Setup/AddinStore.cs:675
at Mono.Addins.Setup.AddinStore.DownloadObject (Mono.Addins.IProgressMonitor monitor, System.String url, System.Type type) [0x00002] in /Users/builder/azdo/_work/1/s/main/external/mono-addins/Mono.Addins.Setup/Mono.Addins.Setup/AddinStore.cs:577
at Mono.Addins.Setup.MonoAddinsRepositoryProvider.DownloadRepository (Mono.Addins.IProgressMonitor monitor, System.Uri absUri, Mono.Addins.Setup.AddinRepository rr) [0x00000] in /Users/builder/azdo/_work/1/s/main/external/mono-addins/Mono.Addins.Setup/Mono.Addins.Setup/MonoAddinsRepositoryProvider.cs:40
at Mono.Addins.Setup.RepositoryRegistry.UpdateRepository (Mono.Addins.IProgressMonitor monitor, System.Uri baseUri, Mono.Addins.Setup.RepositoryRecord rr) [0x0003a] in /Users/builder/azdo/_work/1/s/main/external/mono-addins/Mono.Addins.Setup/Mono.Addins.Setup/RepositoryRegistry.cs:362
Hits file:'/var/folders/p6/jjkn3crj1nd0yqzyf239qnrw0000gp/T/XYZ_5aba8fe7-608e-479b-9a0f-a3ae1f86ec93' not found for module: 'XYZ'
xUnit 2.4
.Net Core 3.1
First, thanks for the great tool! Not to put you out of business, but I hope Microsoft eventually builds something like this into VS for Mac directly. Until then, this has been great. Really helps when writing the tests to know that I'm not missing something in the method I'm testing.
Now for the issue. I'm not sure what to call it other than "null coverage". The method basically shows that the coverage tool doesn't really know about it. Nearly all lines are marked as neither red nor green. I've attached a small solution that demonstrates the problem.
If I comment out the indicated line with the lambda expression (in this case a Select()
call), then everything works normally. I also tested with a simple Where()
call instead and get the same results, so it doesn't seem to be the Select()
call itself, but rather the lambda expression.
That said, I do have another method with a lamba/Where() call that does work - but it's also extremely simple method, only 3 lines, so this might be in combination with something else going on in this method, like the fact it's an async call.
As you can see, the only line that the tool seems to think is actual code, is the one that causes the problem.
Hi there,
is there a support for a .runsettings file? If not, could you please check, it it is possible to add support for .runsettings files?
The official Microsoft documentation for .runsettings files can be found here: https://docs.microsoft.com/de-de/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file?view=vs-2019
Hi, finding this extension helpful, but methods that I designate with the ExcludeFromCodeCoverage attribute still seem to be included. Is there a setting I need to update or include?
Thanks!
After a recent update to VS for Mac, the Coverage window (pad) is blank.
About Visual Studio
Visual Studio Community 2019 for Mac
Version 8.8.10 (build 2)
Installation UUID: abf5071e-d0a5-4a9b-99a4-4c3dcae42d80
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)
Package version: 612000122
Mono Framework MDK
Runtime:
Mono 6.12.0.122 (2020-02/c621c35ffa0) (64-bit)
Package version: 612000122
Roslyn (Language Service)
3.8.0-5.20519.18+4c195c3ac1974edcefa76774d7a59a2350ec55fa
NuGet
Version: 5.8.0.6860
.NET Core SDK
SDK: /usr/local/share/dotnet/sdk/5.0.103/Sdks
SDK Versions:
5.0.103
5.0.102
3.1.406
3.1.405
3.1.402
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks
.NET Core Runtime
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
5.0.3
5.0.2
3.1.12
3.1.11
3.1.8
2.1.23
2.1.22
.NET Core 3.1 SDK
SDK: 3.1.406
Xamarin.Profiler
Version: 1.6.15.68
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Updater
Version: 11
Apple Developer Tools
Xcode 12.4 (17801)
Build 12D4e
Xamarin.Mac
Version: 7.4.0.10 (Visual Studio Community)
Hash: a4c70e7d0
Branch: xcode12.4
Build date: 2021-02-17 17:40:51-0500
Xamarin.iOS
Version: 14.10.0.4 (Visual Studio Community)
Hash: 5a05865f6
Branch: xcode12.4
Build date: 2021-01-28 02:30:23-0500
Xamarin Designer
Version: 16.8.0.510
Hash: 44e3f3ce9
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:06:14 UTC
Xamarin.Android
Not Installed
Microsoft OpenJDK for Mobile
Java SDK: Not Found
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
Android SDK Manager
Version: 16.8.0.32
Hash: 01a7774
Branch: remotes/origin/d16-8
Build date: 2021-01-14 00:34:58 UTC
Android Device Manager
Version: 16.8.0.46
Hash: 0a81419
Branch: remotes/origin/d16-8
Build date: 2021-01-14 00:35:22 UTC
Build Information
Release ID: 808100002
Git revision: f81ffa2444a28c09f173849935ec9ee0195a5b17
Build date: 2021-02-18 12:02:12-05
Build branch: release-8.8
Xamarin extensions: f81ffa2444a28c09f173849935ec9ee0195a5b17
Operating System
Mac OS X 10.16.0
Darwin 20.3.0 Darwin Kernel Version 20.3.0
Thu Jan 21 00:07:06 PST 2021
root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
Enabled user installed extensions
Code Coverage 1.1
Log file excerpt:
Ide.2021-02-15__09-31-42.log
176:INFO [2021-02-15 09:31:47Z]: Add-in loaded: CodeCoverage.Code Coverage
222:2021-02-15 09:31:50.175 VisualStudio[2100:2991004] warning: Could not load signature of CodeCoverage.Coverage.CoverletCoverageProvider:Prepare due to: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
223:2021-02-15 09:31:50.175 VisualStudio[2100:2991004] warning: Could not load signature of CodeCoverage.Coverage.ICoverageProvider:Prepare due to: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
227: at CodeCoverage.CoverageWidget..ctor (CodeCoverage.Coverage.ILoggingService loggingService, CodeCoverage.IStatusBar statusBar) [0x00019] in :0
228: at CodeCoverage.Coverage.CoveragePadWidget..ctor () [0x00017] in :0
229: at CodeCoverage.Coverage.CoveragePad.Initialize (MonoDevelop.Ide.Gui.IPadWindow window) [0x00007] in :0
Facing this issue.. Please suggest am i missing something or what i need to do?
Please refer screenshot
I have been using this extension for months and use it almost daily. Really helpful tool for checking test coverage is adequate.
Today I noticed that the coverage window is not completely blank:
The test project is building and I am able to run all tests successfully. I tried creating another project with a class lib and test project and the same was true for that solution. The test project builds and all tests run / succeed and the coverage tool is blank.
I am on extension version 1.1, here is my Visual Studio For Mac Information:
=== Visual Studio Enterprise 2019 for Mac ===
Version 8.8.7 (build 18)
Installation UUID: 5ace1c1d-a3b5-4f6d-bd18-5325ddc6dd47
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)
Package version: 612000113
=== Mono Framework MDK ===
Runtime:
Mono 6.12.0.113 (2020-02/4fdfb5b1fd5) (64-bit)
Package version: 612000113
=== Roslyn (Language Service) ===
3.8.0-5.20519.18+4c195c3ac1974edcefa76774d7a59a2350ec55fa
=== NuGet ===
Version: 5.8.0.6860
=== .NET Core SDK ===
SDK: /usr/local/share/dotnet/sdk/5.0.102/Sdks
SDK Versions:
5.0.102
5.0.101
5.0.100
3.1.405
3.1.404
3.1.403
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks
=== .NET Core Runtime ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
5.0.2
5.0.1
5.0.0
3.1.11
3.1.10
3.1.9
2.1.23
=== .NET Core 3.1 SDK ===
SDK: 3.1.405
=== Xamarin.Profiler ===
Version: 1.6.15.68
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Xamarin.Android ===
Version: 11.1.0.26 (Visual Studio Enterprise)
Commit: xamarin-android/d16-8/a36ce73
Android SDK: /Users/alex.duffell/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
None installed
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.5
SDK Build Tools Version: 29.0.2
Build Information:
Mono: 5e9cb6d
Java.Interop: xamarin/java.interop/d16-8@79d9533
ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000
SQLite: xamarin/sqlite/3.32.1@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-8@2fb1cbc
=== Microsoft OpenJDK for Mobile ===
Java SDK: /Users/alex.duffell/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Android SDK Manager ===
Version: 16.8.0.32
Hash: 01a7774
Branch: remotes/origin/d16-8
Build date: 2021-01-14 00:34:58 UTC
=== Android Device Manager ===
Version: 16.8.0.46
Hash: 0a81419
Branch: remotes/origin/d16-8
Build date: 2021-01-14 00:35:22 UTC
=== Xamarin Designer ===
Version: 16.8.0.510
Hash: 44e3f3ce9
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:06:14 UTC
=== Apple Developer Tools ===
Xcode 12.4 (17801)
Build 12D4e
=== Xamarin.Mac ===
Version: 7.2.0.3 (Visual Studio Enterprise)
Hash: c51fabee8
Branch: xcode12.3
Build date: 2020-12-10 21:05:04-0500
=== Xamarin.iOS ===
Version: 14.8.0.3 (Visual Studio Enterprise)
Hash: c51fabee8
Branch: xcode12.3
Build date: 2020-12-10 21:05:05-0500
=== Build Information ===
Release ID: 808070018
Git revision: 0f6def3c0ff5f9cee230e65718561cb41c8eedc0
Build date: 2021-01-29 08:24:09-05
Build branch: release-8.8
Xamarin extensions: 0f6def3c0ff5f9cee230e65718561cb41c8eedc0
=== Operating System ===
Mac OS X 10.16.0
Darwin 20.2.0 Darwin Kernel Version 20.2.0
Wed Dec 2 20:39:59 PST 2020
root:xnu-7195.60.75~1/RELEASE_X86_64 x86_64
=== Enabled user installed extensions ===
DeepClean 1.2.5
MFractor 4.4.6
Code Coverage 1.1
Code Distribution Extension 1.1
LightSwitch ๐ก 1.0
Hi! Thanks for this great extension!
Is there a way to install it to VisualStudio 2022 for Mac? I know its still in preview, but I see extensions are already there. But there's no option to add the custom url for the reposiroty. Is there a way to add it manually?
Thanks in advance.
I am using visual studio 2019 for Mac.
Not able to access the Coverage pad through View -> Pads -> Coverage.
=== Visual Studio Professional 2019 for Mac ===
Version 8.9.2 (build 0)
Installation UUID: ea2a1f7d-b6a8-4404-9ec5-3fe1009fa339
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)
Package version: 612000125
=== Mono Framework MDK ===
Runtime:
Mono 6.12.0.125 (2020-02/8c552e98bd6) (64-bit)
Package version: 612000125
=== Roslyn (Language Service) ===
3.9.0-6.21152.10+c10f884b30737542ddd84ca889a4aad9281ce210
=== NuGet ===
Version: 5.8.0.6860
=== .NET Core SDK ===
SDK: /usr/local/share/dotnet/sdk/5.0.201/Sdks
SDK Versions:
5.0.201
5.0.103
3.1.407
3.1.406
2.1.202
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks
=== .NET Core Runtime ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
5.0.4
5.0.3
3.1.13
3.1.12
2.0.9
=== .NET Core 3.1 SDK ===
SDK: 3.1.407
=== Xamarin.Profiler ===
Version: 1.6.15.68
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Xamarin Designer ===
Version: 16.9.0.316
Hash: 2241b204a
Branch: tags/vsm-rel/d16.9-4540908
Build date: 2021-03-10 22:18:10 UTC
=== Apple Developer Tools ===
Xcode 12.4 (17801)
Build 12D4e
=== Xamarin.Mac ===
Version: 7.8.2.5 (Visual Studio Professional)
Hash: 3836759d4
Branch: d16-9
Build date: 2021-02-10 17:56:43-0500
=== Xamarin.iOS ===
Version: 14.14.2.5 (Visual Studio Professional)
Hash: 3836759d4
Branch: d16-9
Build date: 2021-02-10 17:56:44-0500
=== Xamarin.Android ===
Version: 11.2.2.1 (Visual Studio Professional)
Commit: xamarin-android/d16-9/877f572
Android SDK: /Users/718419/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
6.0 (API level 23)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.4
SDK Build Tools Version: 30.0.2
Build Information:
Mono: 5e9cb6d
Java.Interop: xamarin/java.interop@54f8c24
ProGuard: Guardsquare/proguard@912d149
SQLite: xamarin/sqlite@daff8f4
Xamarin.Android Tools: xamarin/xamarin-android-tools@d210f11
=== Microsoft OpenJDK for Mobile ===
Java SDK: /Users/718419/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Android SDK Manager ===
Version: 16.9.0.22
Hash: a391de2
Branch: remotes/origin/d16-9
Build date: 2021-03-05 19:52:30 UTC
=== Android Device Manager ===
Version: 16.9.0.17
Hash: fc2b3db
Branch: remotes/origin/d16-9
Build date: 2021-03-05 19:52:54 UTC
=== Build Information ===
Release ID: 809020000
Git revision: a69906fb0095d046b113a63419c9af3034ce104e
Build date: 2021-03-11 14:01:37-05
Build branch: release-8.9
Xamarin extensions: a69906fb0095d046b113a63419c9af3034ce104e
=== Operating System ===
Mac OS X 10.15.7
Darwin 19.6.0 Darwin Kernel Version 19.6.0
Mon Aug 31 22:12:52 PDT 2020
root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
=== Enabled user installed extensions ===
Hi,
Let me start by thanking you by this tool.
I have a Xamarin (Android and iOS) project with several modules and for each module I have a unit tests project.
In some situations, the line coverage does not appear to be working correctly.
See the situation below
I don't understand how those lines appear uncovered since they are the definition of the structure of the JSON for the response of a REST request. Do you know if I am missing some configuration?
This is the runsettings file I am using (most of it is commented)
Thanks again.
Thanks for this great extension!
As the official Visual Studio Test Coverage is still under review this extension has been saving lives!
I recently updated the MonoDevelop in my Mac and now I'm unable to get the VSMac-CodeCoverage running again
When I attempted to reinstall the extension the message displayed says that it was expecting old versions of MonoDevelop.
It would be nice to write in the README or in the releases the expected version of Mono also :)
(Image Description: Install Complete
Extension installed successfully, with the following warnings:
Warnings (1)
The add-in 'CodeCoverage.Code Coverage, 1.0' could not be updated because some of
dependencies are missing or not compatible:
required: MonoDevelop.UnitTesting,8.5.4, found: Mono Develop.UnitTesting, 17.6.3
missing: MonoDevelop.TextEditor.Cocoa,8.5.4
required: MonoDevelop.Core, 8.5.4, found: MonoDevelop.Core, 17.6.3
required: MonoDevelop.lde, 8.5.4, found: MonoDevelop.lde,17.6.3)
This extension works pretty well but I've run into a problem where it is showing 95% branch coverage but the visuals do not show where this branch is. It would be nice if the gutter was color coded with a special color to denote a branch coverage issue. It would also be nice to get a list of the lines that are missing coverage and allow jumping right to them instead of having to hunt them down. Again, great tool. Thanks for making it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.