Filtering default traits/categories in the .runsettings file
See original GitHub issueVS Test Explorer displays all discovered tests by default. In dotnet/runtime some tests are disabled via traits (i.e. ActiveIssue, SkipOnTargetFramework, ConditionalFact, ConditionalTheory). These tests should be filtered out by default inside the VS Test Explorer by introducing a trait filter entry in the .runsettings file. Same applies to when running dotnet test
on the CLI, default traits should be recognized in the .runsettings
file.
- The
.runsettings
file needs a trait filter option, i.e.<TraitFilter>-failing,-IgnoreForCI</TraitFilter>
- That option needs to be honored by the VS Test Explorer UI.
cc @ManishJayaswal @singhsarab this is part of the the design document that I created a few months ago: https://github.com/ViktorHofer/designs-private/pull/1.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:25 (22 by maintainers)
Top Results From Across the Web
Configure unit tests by using a .runsettings file
Autodetect the run settings file · Select Tools > Options > Test > Auto Detect runsettings Files. Auto detect runsettings file option in...
Read more >Customizing Code Coverage Analysis - Visual Studio
By default, code coverage analyzes all solution assemblies that are loaded ... The run settings file is the configuration file used by unit ......
Read more >How to select a tests form a test suite
I don't think TestCaseFilter is one of the properties allowed in the runsettings file. You would probably need to either filter your suite...
Read more >Untitled
Path To VSTest.console.exe: C:\Program Files\Microsoft Visual ... Filtering default traits/categories in the .runsettings file #2273 - GitHub Visual Studio ...
Read more >Runsettings file in Visual Studio 2019 not including ...
I am expecting runsetting file to include all files for code coverage and I should be able to exclude whatever files I don't...
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
@vritant24 there is a PR, I marked you as a reviewer:
Here is my project that I used to figure this out, it uses the nugets from the locally built vstest and testfx, let me know if you need any help plugging this into VS:
UnitTestProject29.zip
Thanks a lot for clarifying.