Is there a way to mark a Specflow test with an “Explicit” attribute? I am aware that a test can be marked with the “Ignore” attribute via the use of the special tag @ignore.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Maybe.
If you look at the generated xxx.feature.cs, you will see that it is defined as
So you can add another file to your project
xxx.partial.csthat contains the other part of your partial definition.And that’s the end of what I know, now for you might be able to do.
In theory you could use the partial class definition and modify it, to make it abstract. Then you could add a derived class where you override the test in question, this would have to be a
newas we can’t usevirtualin the xxx, and add your[Explicit]there.I have no idea if this will work. You could have all sorts of issues with the abstract not taking, or the test attributes disappearing on the derived class, etc. But maybe it might get you going.
P.S. I’m also not sure this is anything near to good practice. 🙂