Git Product home page Git Product logo

vsmac-codecoverage's People

Contributors

ademanuele avatar dogukandemir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vsmac-codecoverage's Issues

CodeCoverage is showing 0%

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.

Unable to add repository

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 not found, reports 0%

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

Lambda expressions cause method to show null coverage

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.

Screen Shot 2020-07-04 at 2 18 46 PM

As you can see, the only line that the tool seems to think is actual code, is the one that causes the problem.

CoverageTest.zip

Update to latest VS4Mac

Hi, thank you for the extension!

Could you please update the extension to support the latest stable Visual Studio for Mac?

Version 8.5 (build 3183)

Installation process:
Screen Shot 2020-03-25 at 11 04 35 PM

ExcludeFromCodeCoverage not working for methods

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!

Coverage window is blank after VS Update

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

Extension Window Is Blank

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:
image

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

VisualStudio Mac 2022 install

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.

Not able to access the Coverage pad through View -> Pads -> Coverage.

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 ===

Code Coverage 1.2
Screenshot 2021-03-22 at 1 59 45 PM

Setting lines as uncovered without apparent reason

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
image

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)

image

Thanks again.

Update mono dependency or document required mono version

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 :)

Captura de Tela 2023-08-21 aฬ€s 17 05 12

(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)

Branch coverage

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.