Unit Testing with Visual Studio 11: MSTest, NUnit, xUnit.net, and Code Clone

Version: 1.2.0

Description

In this lab, you will learn how unit testing is being completely revamped in Visual Studio 11. By making the unit testing engine in Visual Studio extensible, Visual Studio 11 will open the door for 3rd party unit testing adapters such as NUnit and xUnit.net. You will also learn about how the new code clone capability goes hand-in-hand with delivering high quality software by helping you identify blocks of semantically similar code which may be candidates for common bug fixes or refactoring.

Overview

In this lab, you will learn how unit testing is being completely revamped in Visual Studio 11. By making the unit testing engine in Visual Studio extensible, Visual Studio 11 will open the door for 3rd party unit testing adapters such as NUnit and xUnit.net. You will also learn about how the new code clone capability goes hand-in-hand with delivering high quality software by helping you identify blocks of semantically similar code which may be candidates for common bug fixes or refactoring.

Prerequisites

In order to complete this lab you will need the Visual Studio 11 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see this blog post.

About the Fabrikam Fiber Scenario

This set of hands-on-labs uses a fictional company, Fabrikam Fiber, as a backdrop to the scenarios you are learning about. Fabrikam Fiber provides cable television and related services to the United States. They are growing rapidly and have embraced Windows Azure to scale their customer-facing web site directly to end-users to allow them to self-service tickets and track technicians. They also use an on-premises ASP.NET MVC application for their customer service representatives to administer customer orders.

In this set of hands-on labs, you will take part in a number of scenarios that involve the development and testing team at Fabrikam Fiber. The team, which consists of 8-10 people, has decided to use Visual Studio application lifecycle management tools to manage their source code, run their builds, test their web sites, and plan and track the project.

Exercises

This hands-on lab includes the following exercises:

  1. Unit Testing
  2. Code Clone Analysis

Estimated time to complete this lab: 30 minutes.