-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
ConditionalFactAttribute
on the tests are ignored when ran on VS Test Explorer
#1161
Comments
any idea @safern or @ViktorHofer ??? |
@Gnbrkm41 does this apply for |
Both it seems. It also happens for other attributes like |
Yes, that's the expected behavior as VS Test Explorer by default doesn't filter on traits. I started a discussion with vstest some months ago to allow specifying default included/excluded traits via the runsettings file. |
@ViktorHofer do you want to close this issue then, or open is fine to have it under your radar to track the status of the discussion you're having with VS Test Explorer |
Tracking vstest issue: microsoft/vstest#2273 |
Let's keep this open on our side for tracking. |
Thanks @ViktorHofer -- I assigned to you since you're tracking that work. |
@ViktorHofer, Has this been addressed? Looks like the tracking issue on the vstest side has been fixed. |
Unfortunately not as we require an updated xunit.runner.visualstudio package: xunit/visualstudio.xunit#205 (comment) |
Sorry about that, just released it: https://www.nuget.org/packages/xunit.runner.visualstudio/2.4.2 not sure what templates need to be updated to use 2.4.2 instead of 2.4.1 |
It appears that
ConditionalTheory
Attributes on the tests are ignored during discovery / run and the tests are allowed to run regardless of the value returned from the predicate.For example, Various tests under
System.Net.Security.Tests
were failing withTypeInitializationException
,PlatformNotSupportedException
andObjectDisposedException
s; it appears that most of them haveConditionalFact
attributes, which when evaluated returns false.Tests that had failed, though not all of them have the attribute:
I'm running VS2019 16.5 P1. It's possible that there's other repositories this might be suitable for but I am not entirely sure which one it is, or if this is specific to something on this repo.
The text was updated successfully, but these errors were encountered: