If you want to create a custom attribute for MS test (say [Repeat(3)] how would you do that?
Custom attributes. A custom attribute is a property that you can define to describe assets. Custom attributes extend the meaning of an asset beyond what you can define with the standard attributes. You can create a custom attribute and assign to it a value that is an integer, a range of integers, or a string.
FindParamAttribute: You use this attribute to describe how an element can be found on the page. You set this attribute on test methods or share it across all test methods of a particular test class by setting it on the test class that contains the test methods that will use the FindParam definitions.
I don't think you will like the answer: there is no supported way. However, there is a codeplex project MSTestExtensions implementing a work around and a blog post about how MSTestExtensions works. (Using ContextBoundObject)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With