O'Reilly logo

Professional Application Lifecycle Management with Visual Studio 2013 by Martin Woodward, Brian Keller, Brian Keller, Brian A. Randell, Martin Hinshelwood, Mickey Gousset

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 19Unit Testing

What's in this chapter?

  • Learning the common concepts and benefits of unit testing
  • Creating a unit test using the Visual Studio unit testing framework
  • Executing, managing, and viewing the results of unit tests
  • Using Microsoft Fakes
  • Retrieving and installing test adapters

Wrox.com Code Downloads for this Chapter

The wrox.com code downloads for this chapter are found at www.wrox.com/go/proalm3ed on the Download Code tab. The files are in the Chapter 19 download folder and individually named as shown throughout this chapter.

Programmatic unit testing involves writing code to verify a system at a lower and more granular level than with other types of testing. It is used by programmers for programmers, and is quickly becoming standard practice at many organizations. All editions of Visual Studio include unit testing features that are fully integrated with the IDE and with other features (such as reporting and source control). Developers no longer need to rely on third-party utilities (such as NUnit) to perform their unit testing, although they still have the option to use them and, in fact, can integrate them into Visual Studio using the test adapter framework.

This chapter describes the concepts behind unit testing, why it is important, and how to create effective unit test suites. You learn about the syntax of writing unit tests, and you see how to work with Visual Studio's integrated features for executing and analyzing those tests. The discussion then ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required