-
-
Notifications
You must be signed in to change notification settings - Fork 108
Description
Problem Statement
I am looking into migrating from XUnit, and am running into an issue in CI. I have a solution with multiple test projects. Most of the test projects are unit tests, but there is one project that is all Integration tests, which are marked with the Category Integration.
In CI, which is used for multiple different repositories, we run the unit tests in one pipeline job, and the integration tests in another by just running dotnet test against the solution file. I accomplish this today using --filter Category=Integration for the integration job, and the inverse of this for the unit test job. I see that I can do the same thing with --treenode-filter, and it works, except that when the filter causes all the tests in a project to be skipped, the exit code is 1, which causes my CI to fail.
Proposed Solution
I assume this was done to help catch someone accidentally skipping all tests, but for my use case, I would like some way to override this behavior, and make it work like XUnit did. 2 Options come to mind:
- A new flag that disables this behavior
- A different exit code when there are no tests failing but an entire project was skilled. Then I could use your existing
--ignore-exit-codeflag to ignore that exit code for my use case.
Alternatives Considered
No response
Feature Category
Test Execution / Lifecycle
How important is this feature to you?
Critical - blocking my adoption/usage of TUnit
Additional Context
No response
Contribution
- I'm willing to submit a pull request for this feature