Explicit tests executed when running with dotnet test and a filter
See original GitHub issueHello
The tests marked with [Explicit]
seems to be executed since 4.0.0 when trying to run test from the command line using --filter
dotnet test TestProject1.sln --filter TestProject1
<TargetFramework>net5.0</TargetFramework>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
Repro: TestProject1.zip
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Running tests marked as [Explicit] with dotnet test
1 Answer. As per this Github issue this is actually a known bug with NUnit3TestAdapter where tests marked as [Explicit] would not execute...
Read more >Run selected unit tests - .NET
NET Core, you can use a filter expression to run selected tests. This article demonstrates how to filter tests. The examples use dotnet...
Read more >Explicit
The Explicit attribute causes a test or test fixture to be skipped unless it is explicitly selected for running. The test or fixture...
Read more >Improve your pipeline maintainability with test categories in ...
I have worked in a team where xUnit was used as the testing framework in ... Run all unit tests dotnet test --filter...
Read more >Running and Filtering Tests with the .NET Core Command ...
Assuming we have two test projects (as follows), the tests contained within these test projects can be executed with the dotnet test command....
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 Free
Top 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
@runehalfdan Thanks! It seems you’re right in your case. The case is different from the one reported here, so I’ll move this into a new issue.
I have a similar issue, but I use NUnit-filters ‘cat!=FOO’
Using the enclosed test-project here, and adding some categorized filters, Explicit tests are executed Running
dotnet test TestProject1.sln -v:n --logger="Console;verbosity=detailed" -- NUnit.Where="cat!=FOO"
productsAdding ‘cat!=Explicit’ does not help
(btw, using legacy discovery does help, and we will use that for now)
All tests: