0% coverage is being shown after running tests
See original GitHub issueHi,
After running my tests with Nunit I get an unexpected result from coverlet. My folder structure is
root
\src
\projectfolder\project.csproj
\tests
\testprojectfolder\testproject.csproj
\solution.sln
I executed the tests from within the testprojectfolder The result is printed below.
dotnet test /p:CollectCoverage=true
Build started, please wait...
Build completed.
Test run for /home/rob/git/svc_system_center/tests/Sag.SystemCenter.Api.Tests/bin/Debug/netcoreapp2.0/Sag.SystemCenter.Api.Tests.dll(.NETCoreApp,Version=v2.0)
Microsoft (R) Test Execution Command Line Tool Version 15.5.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
NUnit Adapter 3.9.0.0: Test execution started
Running all tests in /home/rob/git/svc_system_center/tests/Sag.SystemCenter.Api.Tests/bin/Debug/netcoreapp2.0/Sag.SystemCenter.Api.Tests.dll
NUnit3TestExecutor converted 456 of 456 NUnit test cases
NUnit Adapter 3.9.0.0: Test execution complete
Total tests: 456. Passed: 452. Failed: 0. Skipped: 4.
Test Run Successful.
Test execution time: 3.8804 Seconds
Calculating coverage result...
Generating report '/home/rob/git/svc_system_center/tests/Sag.SystemCenter.Api.Tests/coverage.json'
+--------------------------------------------+--------+--------+--------+
| Module | Line | Branch | Method |
+--------------------------------------------+--------+--------+--------+
| Sag.SystemCenter.LoginManagement.BL | 0% | 0% | 0% |
+--------------------------------------------+--------+--------+--------+
| Sag.SystemCenter.UserManagement.BL | 0% | 0% | 0% |
+--------------------------------------------+--------+--------+--------+
| Sag.SystemCenter.Identity | 0% | 0% | 0% |
+--------------------------------------------+--------+--------+--------+
| Sag.SystemCenter.UserManagement.DAL | 0% | 0% | 0% |
+--------------------------------------------+--------+--------+--------+
| Sag.SystemCenter.ApiManagement | 0% | 0% | 0% |
+--------------------------------------------+--------+--------+--------+
| Sag.SystemCenter.Captcha.BL | 0% | 0% | 0% |
+--------------------------------------------+--------+--------+--------+
| Sag.SystemCenter.Domain | 0% | 0% | 0% |
+--------------------------------------------+--------+--------+--------+
| Sag.SystemCenter.Api | 0% | 0% | 0% |
+--------------------------------------------+--------+--------+--------+
| Sag.SystemCenter.Messaging | 0% | 0% | 0% |
+--------------------------------------------+--------+--------+--------+
| Sag.SystemCenter.ApplicationManagement.DAL | 0% | 0% | 0% |
+--------------------------------------------+--------+--------+--------+
I’m running on a Linux Mint machine with this dotnet configuration
.NET Command Line Tools (2.1.4)
Product Information:
Version: 2.1.4
Commit SHA-1 hash: 5e8add2190
Runtime Environment:
OS Name: linuxmint
OS Version: 18.3
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/2.1.4/
Microsoft .NET Core Shared Framework Host
Version : 2.0.5
Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54
Issue Analytics
- State:
- Created 5 years ago
- Comments:103 (11 by maintainers)
Top Results From Across the Web
Overall code coverage showing zero after running test class
Every now and then I encounter the following issue after I run my test classes, they all marked as completed and pass, however...
Read more >Why am I getting 0 coverage from Jest when running it ...
I've found the problem and a workaround for it. In my package.json I have my Jest configuration and it includes: "jest": { "rootDir":...
Read more >Code Coverage is showing 0% for java projects - SonarQube
Hi, We have recently upgraded our sonar application from 7.1 to 7.9.6 (LTS in 7.x). We have observed that code coverage is showing...
Read more >My all Test Case Is passed But still getting 0% coverage
Test Class methods are passing But but when i am checking the Code Coverage it is giving me 0% coverage & there is...
Read more >Code coverage testing - Visual Studio (Windows)
To Show 0% covered, enter "Not Covered (%Lines)":"0" in the search box. Manage code coverage results. The Code Coverage Results window usually ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can confirm this fixed the issue! Good find @seesharper!
I can confirm that at least some of my issues were FIXED in this combo of releases. Thank you all for your effort here!
On Fri, Sep 6, 2019 at 6:48 AM Marco Rossignoli notifications@github.com wrote: