Skip to content

0% coverage is being shown after running tests #110

@robvanpamel

Description

@robvanpamel

Hi,

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions