I remember something like 'explicit', and google says that nunit has such attribute. Does Microsoft.VisualStudio.TestTools.UnitTesting provide something like this?
Unit tests can be performed manually or automated. Those employing a manual method may have an instinctual document made detailing each step in the process; however, automated testing is the more common method to unit tests. Automated approaches commonly use a testing framework to develop test cases.
Run tests in Test Explorer If Test Explorer is not visible, choose Test on the Visual Studio menu, choose Windows, and then choose Test Explorer (or press Ctrl + E, T). As you run, write, and rerun your tests, the Test Explorer displays the results in a default grouping of Project, Namespace, and Class.
The MSTest tools does not explicitly support this type of behavior at an attribute level. At the attribute level you can either enable a test via the TestMethod
attribute or completely disable it with the Ignore
attribute. Once the Ignore
attribute is added, mstest will not run the test until it is removed. You cannot override this behavior via the UI.
What you can do though is disable the test via the property page. Open up the test list editor, select the test you want and hit F4 to bring up the property page. Set the Test Enabled property to false. The test will now not run until you re-enable it through the property page. It's not exactly what you're looking for but likely the closest equivalent.
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