-
Notifications
You must be signed in to change notification settings - Fork 80
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
Can't filter by traits on ITheoryDataRow
#426
Comments
I am working to reproduce the problem, but I'm running into what appears to be an environmental issue on my machine: microsoft/vstest#10605 |
Okay, I am able to reproduce this and the good news is, there is a workaround. If you enable theory pre-enumeration, then you can filter by the trait: This verifies my hypothesis. For quite a while, we have tried to optimize performance by disabling theory pre-enumeration if you were running tests from the command line, on the idea that it was unnecessary: visualstudio.xunit/src/xunit.runner.visualstudio/VsTestRunner.cs Lines 210 to 212 in 9154f3f
What's changed between v2 and v3 is that traits are now available via ITheoryDataRow but we never updated the code here and so when we don't pre-enumerate your theory data, we never see the traits and you can't filter by them. The good news is, the fix is quite simple, so that's my next stop. 😄 |
|
Not quite fixed yet. 😬 |
Okay, but for real this time. 😂 Fix available in |
And of course I see now my commit message says "off" instead of "on", but whatever. 💀 |
I had reported xunit/xunit#3030 before, on later versions I no longer get a
Catastrophic failure
but a trait filter with traits that come fromITheoryDataRow
still don't appear to work.Minimal repo: https://github.com/justindbaur/xunit-v3-problem
I expect
dotnet test --filter "MyTrait=One"
to run just the theory data row with1, 2
. But instead it finds no tests with the specified filter.I'm using:
The text was updated successfully, but these errors were encountered: