How to make a test method Does not start in Visual Studio Unit Test

How to make verification method not executed in Visual Studio Unit Test? using Visual Studio 2010 with .NET 4.0.

Suppose I have 10 test methods, of which 1 test method does not work due to external dependencies. If I want to run all 10, I will get an error in one test.

One solution: Do not run the test. But I need to know if there are any attributes or something like that that just bypasses the test and it will not run.

I tried with the [WorkItem(1234)] attribute, but still the test is running.

Any help is greatly appreciated.

+7
source share
1 answer

Yes, you can add the Ignore attribute to the test you want to skip:

 [TestMethod, Ignore] public void ThisTestWontRun() { // Test code here } 
+24
source

All Articles