-
Notifications
You must be signed in to change notification settings - Fork 748
Pre-Filtering in NUnitLite has problems #3454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This sounds familiar. Has it come up before? |
Ah! It's #3356, but that was fixed and closed by changing the VS adapter - eliminating pre-filtering as a default. So the issue was never dealt with in nunitlite. As a workaround, pass in a pre-filter that always succeeds, rather than taking the default. |
However #3356 really did not fix the problem, only eliminated the trigger. Could this be solved by simply searching the entire test assembly for classes with the SetupFixture attribute, and automatically adding them to the pre-filter? |
I fixed this problem in my CF version as above. In DefaultTestAssemblyBuilder.
and
just before
I am not setup to modify the release code, so someone else will have to do this if it is desired. This should fix the adapter problem as well. |
I think that will run all setup fixtures in the discovery phase, not just those that relate to the selected tests. |
This issue is also related to #3399 |
Still an issue with latest NUnitLite. |
Resolved by #3679 |
There appears to be an issue with the pre-filtering in NunitLite.
If there is a a namespace a.b which contains a SetupFixture, and a namespace a.b.c which has a test method a.b.c.TestMethod, and only the test a.b.c.TestMethod is specified, the setup fixture's OneTimeSetup and OneTimeTearDown methods are never run.
Apparently, the pre-filtering excludes the a.b namespace from consideration.
It would seem that pre-filtering should examine all parent namespaces for a SetupFixture, even if tests in those namespaces are excluded by the pre-filtering.
Maybe there needs to be a simple way to turn pre-filtering off entirely?
The text was updated successfully, but these errors were encountered: