[SpecFlow] Generators to support generating attributes with name value pairs from tags
Hi,
To help with test categorisation NUnit, xUnit, and MSTest all support attributes which allow you to decorate a test class or method with name/value pairs:
- NUnit Property Attribute
- xUnit Trait Attribute
- MSTest TestProperty Attribute
Does SpecFlow support mapping tags to those attributes? (eg map @Foo:Bar to name = Foo, value = Bar)
If you'd like I'm happy to go in to more detail about why I'd think it is helpful, but I'm just wondering if you have ever considered this previously/thinks its possible?
Also, I know I may be able to achieve this for my own use by creating a custom generator plugin and using decorators.
Thanks,
Sam
-
No, this feature is not available at the moment. We convert tags to traits/testcategories, but that is all.
But I would be happy to review a Pull Request for SpecFlow that will add this feature to SpecFlow.
0 -
For some reason I thought that the Test Explorer in Visual Studio groups tests which had the same property name (when you group by traits) but I was mistaken so I'm not sure this feature would be particularly beneficial.
0 -
Test Explorer is capable to group by traits and as we convert the tags into traits, this use case is already working.
So is the use case you had in mind with this feature request already covered?
Tbh, I am a little bit confused now.
0
Please sign in to leave a comment.
Comments
3 comments