-
Notifications
You must be signed in to change notification settings - Fork 259
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
Add traits to a TestNode properties #4007
Comments
Even without this, there is still the issue they the underlying property type is internal. I think this is blocking framework authors from setting traits/categories unless there's a workaround? |
Marking as bug although I don't have time to test/investigate right now. We should have supprot for traits/properties/metadata as it's a heavily used feature in VS. |
It's probably a better idea that exposing this technical type, let me discuss with the team and get back to you. |
Hey @thomhurst, Good news, I was doing some checks and tests about this and found out we already implemented TestMetadataProperty, it's public and it's already plugged into the communication protocol for Test Explorer. I'll close as done but please if there are any bug please reopen/comment. |
So for a category do I just add a metadata property with an empty key? |
Null or empty string value, the category is the key. I guess we could provide a different ctor for that! See https://github.com/microsoft/testfx/blob/main/docs/mstest-runner-protocol/001-protocol-intro.md
|
Thanks seems to be working great. Up to you if you want to leave this open to create a simpler constructor 😄 |
Based on this discussion: #3991
A few things:
traits
key that needs adding to thePropertyBag
- Leaking internal testing platform implementation details and could be easily missed or unknown. This could be abstracted away behind a custom property object.SerializableNamedKeyValuePairsStringProperty
which the VSTest bridge uses is internal, so framework authors don't have the option of using that.Suggestion:
The text was updated successfully, but these errors were encountered: