-
Notifications
You must be signed in to change notification settings - Fork 392
Closed
Labels
bugSomething isn't workingSomething isn't workingnetfxIssue happens only on .NET Framework versionIssue happens only on .NET Framework versionstale
Description
This repros locally and in Azure Pipelines builds.
git clone https://github.com/AArnott/Xunit.StaFact.git
cd Xunit.StaFact\src
git checkout 6d1a5e6023f612ad00d2e00f5204f362dc0a71ce
dotnet test --filter "TestCategory!=FailureExpected" -v n /p:CollectCoverage=true
Notice how net472 runs 0 tests and reports:
+---------------+------+--------+--------+
| Module | Line | Branch | Method |
+---------------+------+--------+--------+
| Xunit.StaFact | 0% | 0% | 0% |
+---------------+------+--------+--------+
+---------+------+--------+--------+
| | Line | Branch | Method |
+---------+------+--------+--------+
| Total | 0% | 0% | 0% |
+---------+------+--------+--------+
| Average | 0% | 0% | 0% |
+---------+------+--------+--------+
While the netcoreapp targets report non-zero results:
+---------------+--------+--------+--------+
| Module | Line | Branch | Method |
+---------------+--------+--------+--------+
| Xunit.StaFact | 86.44% | 62.19% | 78.33% |
+---------------+--------+--------+--------+
+---------+--------+--------+--------+
| | Line | Branch | Method |
+---------+--------+--------+--------+
| Total | 86.44% | 62.19% | 78.33% |
+---------+--------+--------+--------+
| Average | 86.44% | 62.19% | 78.33% |
+---------+--------+--------+--------+
In fact simply comparing the output of these two commands shows that the mere collection of code coverage is what blocks test discovery:
dotnet test --filter "TestCategory!=FailureExpected" /p:CollectCoverage=true -f net472
dotnet test --filter "TestCategory!=FailureExpected" -f net472
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingnetfxIssue happens only on .NET Framework versionIssue happens only on .NET Framework versionstale