Bitslapping contest: LX vs compile on Test integration in VS2005 part 2

Round 2: LX offense, compile defending

Continuing the bitslap on unit test integration between Dennis and myself. Time to counter the first round. Ready, set, go.

VS2005 comes with three frameworks for testing:

  • Unit testing (in assembly Microsoft.VisualStudio.QualityTools.UnitTestFramework)
  • Web testing (in assembly Microsoft.VisualStudio.QualityTools.WebTestFramework)
  • Load testing (in assembly Microsoft.VisualStudio.QualityTools.LoadTestFramework)

Since I already said we where only going to focus on unit testing, I’ll only look at the unit testing framework. Let’s see what the NUnit framework does against all of Microsoft’s goodness.

Extra attribute goodness

  1. Tests can have a timeout. Use TimeoutAttribute to indicate the timeout in milliseconds.
  2. You can extend the metadata on tests by specifying the TestPropertyAttribute.
  3. Add descriptions to your tests.
  4. You are able to prioritize your tests with the PriorityAttribute.

[Description(“Statuc command type 1 protocol test against local server.”)]


[TestProperty(“LiveServer”, “Yes”)]

[Owner(“Alex Thissen”)]



public void StatusCommand1ToLocalServerTest()


  VentriloServer server = protocol.GetServerStatus(localServerEndPoint, StatusCommand.GenericInfo, localServerPassword);


  Assert.IsNotNull(server, “No response received from server.”);

  Assert.AreEqual(0, server.Lobby.Clients.Count, “Status command 1 should not return any clients.”);

  Assert.AreEqual(0, server.Lobby.Channels.Count, “No channels should be returned for status command 1.”);


This attributed information is viewable from both the Test View window and the Properties window for a selected test.

Test View window

Properties for test

Tight integration with Team Foundation Server

  1. Unit tests can be associated with one or more Team Foundation Server workitem (with WorkItemAttribute).
  2. You can create workitems right from the test results.
  3. Tests can be part of an iteration or project area. (See also: Properties window above)

Create Workitem

So, let Dennis sweat for a while and see what he makes of this. I didn’t even whip out the big guns yet. Other colleague Mike Glaser already commented on this in the previous round. Your turn, Dennis. 😛

This entry was posted in Uncategorized. Bookmark the permalink.

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 )

Google photo

You are commenting using your Google 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