(Custom) attributes for testcases in generated code #486
Closed
304NotModified
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
I don't know if you are aware of it, but this is currently possible already with generator plugins. You need to have a named registration for either the ITestClassDecorator ot the ITestMethodDecorator interferences. See https://docs.reqnroll.net/latest/extend/decorators.html |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So I was thinking over #476
I would be could cool if we could add attributes to the generated tests
E.g. instead of the current generation:
we could generate with a Order attribute:
Or with even a custom attribute
This would be great as there are many attributes you sometimes like to use.
I checked the code generation (NUnit3TestGeneratorProvider) and I think something like this could work:
And you define some mapping, for example in reqnroll.json
(Bit hard to do Regex in JSON, but it could work - regex example: https://regex101.com/r/jMAN4H/1)
Would that work?
In the future you also need that for testclasses I guess
questions:
Beta Was this translation helpful? Give feedback.
All reactions