Summary
When using dotnet test with --test-modules and a --filter, it should be possible to request (via parameter) that the zero tests ran failure should happen for the entire run instead of for each module.
Background and Motivation
We frequently use a filter in our test runs to run subsets of tests, especially in pipelines. We might only run Priority 1 tests or run a category of tests for a product feature. When doing this, any module with no matches causes the "Zero tests ran" error to be output. With lots of test modules, this yields a lot of potential errors when we know some won't have a match for the filter.
Proposed Feature
I know it's possible to use --ignore-exit-code 8 to suppress the error entirely. However, it's still valuable to have a "zero tests ran" error for the full run instead of one per module. It would be beneficial to have a parameter that makes this behavior apply to the full run at a summary level.
I've also noticed --minimum-expected-tests 0 still fails for each module if there are zero tests run. It seems like --minimum-expected-tests 0 should have the same outcome as --ignore-exit-code 8.
Extending from that, a parameter such as --minimum-expected-tests-for-all-test-modules n might be a way to support the requested behavior.
Summary
When using
dotnet testwith--test-modulesand a--filter, it should be possible to request (via parameter) that the zero tests ran failure should happen for the entire run instead of for each module.Background and Motivation
We frequently use a filter in our test runs to run subsets of tests, especially in pipelines. We might only run Priority 1 tests or run a category of tests for a product feature. When doing this, any module with no matches causes the "Zero tests ran" error to be output. With lots of test modules, this yields a lot of potential errors when we know some won't have a match for the filter.
Proposed Feature
I know it's possible to use
--ignore-exit-code 8to suppress the error entirely. However, it's still valuable to have a "zero tests ran" error for the full run instead of one per module. It would be beneficial to have a parameter that makes this behavior apply to the full run at a summary level.I've also noticed
--minimum-expected-tests 0still fails for each module if there are zero tests run. It seems like--minimum-expected-tests 0should have the same outcome as--ignore-exit-code 8.Extending from that, a parameter such as
--minimum-expected-tests-for-all-test-modules nmight be a way to support the requested behavior.