-
Notifications
You must be signed in to change notification settings - Fork 255
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
TestCaseFilter with custom properties? #731
Comments
So it must be implemented in each test adapter separately? I was thinking about making this issue a feature request for vstest, but I should probably file it against mstest (and maybe nunit)?
Thanks, that way it works. |
Yes each test adapter needs to implement it separately because they have different representations of tests. The way this was implemented, there is no common abstraction over this filtering concept. If you want it in MSTest then microsoft/testfx is the repo to search for this issue, or creating a new one. And similarly for NUnit. |
@pkruk2 moved your issue to testfx (MSTest), to make it easier for you. No need to file another issue. Related #201 |
Thank you. I'll try to file FR for other test adapters soon |
✅ Successfully linked to Azure Boards work item(s): |
Hello,
I'm trying to use
TestCaseFilter
with custom properties. Is that possible?I was trying to pass various forms of
/TestCaseFilter
tovstest.console.exe
but without success. Works withTestCategory
but not with custom properties.For example in MSTest:
For XUnit it's
Trait
and for NUnit it'sProperty
.In https://github.com/Microsoft/vstest-docs/blob/master/docs/filter.md#syntax there's a list of "Supported properties":
TestProperty
there :(Traits
listed but I could not make it work (filter didn't match any test)I'm attaching a simple solution with 3 UT projects (mstest, xunit, nunit): ClassLibrary1.zip
I have used vstest.console.exe 16.7.0 from Microsoft.TestPlatform nuget package.
(In fact I'd like to pass the TestCaseFilter through RunSettings when vstest is used programmatically through IVsTestConsoleWrapper API, but I have started by checking how it works in the vstest.console.exe - I assume it works the same in API, from microsoft/vstest#2273).
AB#2050968
The text was updated successfully, but these errors were encountered: