MSTest fails to mention ignored tests

14 November, 2008 § Leave a comment

The other day I was writing some unit tests for a project I was working on. At the time, these tests contained some credentials that I both didn’t want to check-in and also didn’t want to break the build at a later date if I ever changed my password.

The test looked like this:

public void TestLogIn()
  var username = "j.wein";
  var password = "123456";

  var authenticated = Directory.Authenticate( username, password );

  Assert.IsTrue( authenticated );

I was writing the tests to track down a bug. Thus I wanted the code to go against a real LDAP directory, not a double. As I was getting ready to check it in, I changed the test to be ignored. This is the syntax:

[Test, Ignore]
public void TestLogIn()

When I ran the tests, the number of tests ran decreased by one, and there was no mention of a test that was skipped or ignored.

On the other hand, nUnit handled an ignored test like expected. When the test run had finished, it said that 7 tests succeeded and one was ignored.

Tagged: , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

What’s this?

You are currently reading MSTest fails to mention ignored tests at JAWS.


%d bloggers like this: