danjackknife
danjackknife

Reputation: 31

Unit Tests in Visual Studio 2012: How to prevent Tests from being skipped?

I'm having trouble with debugging my tests. They kept being skipped:

enter image description here

However, I do Analyze Code Coverage, I get Failed or Passed Test results.

Upvotes: 0

Views: 133

Answers (2)

Dror Helper
Dror Helper

Reputation: 30780

I've seen a similar behavior if the test has caused an exception in another thread or on that could not be caught. In previous version of MSTest when an exception was thrown from the Initialize/cleanup methods.

Try debugging the test - if the problem was caused by an exception it would break when the exception is thrown.

Upvotes: 0

Vladimir
Vladimir

Reputation: 19

Check and remove [Ignore] attribute for this test case.

[Ignore]
[TestMethod]        
public void DoSelect_ShouldReturnA_SqlDataReader()
{
    // some code...
}

Upvotes: 1

Related Questions