> Nearby Locations
Des Moines
515-226-3265
 
 
 
My Account  |  View Cart
Search:
 


Class Outline*


| Request Info | Contact Us


Unit Testing Using Visual Studio 2010

Duration:
2 Days

Overview:
This two-day, instructor-led course provides students with knowledge and skills to effectively use Visual Studio 2010 to design, write, and run .NET unit tests.  The course focuses on applicable features and capabilities of Visual Studio as it relates to unit testing and Test Driven Development.  This course also introduces other, industry-standard, open-source tools, and demonstrates how they integrate with Visual Studio and .NET development practices.

Objectives

This course teaches students how to leverage unit-testing capabilities of Visual Studio 2010 in order to properly implement Test Driven Development.  Specifically, attendees will learn how to:

  • Create and execute unit tests in Visual Studio
  • Manage tests using lists and categories
  • Use Test Impact Analysis
  • Implement Test Driven Development (TDD)
  • Apply TDD as a design tool
  • Refactor existing code to bring it under test
  • Test boundary conditions
  • Appropriately identify and apply advanced TDD technologies such as mock objects
  • Understand an overall test strategy
  • Use data-driven unit tests

Audience:

This course is intended for current software development professionals, including architects, developers, and testers who are involved with building Windows or Web-based .NET applications.  Students will learn and receive hands-on experience using Visual Studio to design, write, and run .NET unit tests and learn the TDD discipline.

Prerequisites:

Before attending this course, students should have experience creating, maintaining, and debugging software using Visual Studio and Visual C#.  Knowledge of software development lifecycle and Agile software development is also beneficial.

Topics

MODULE 1: UNIT TESTING IN .NET

This module introduces fundamental concepts of unit testing and how it is supported by various unit testing frameworks and tools for .NET, including NUnit, MSTest, Visual Studio 2010, and TestDriven.NET.

Lessons

  • Unit tests explained
  • Unit tests vs. integration tests
  • .NET unit testing frameworks
  • NUnit vs. MSUnit
  • Unit testing in Visual Studio 2010
  • TestDriven.NET

Lab Activities

  • Create and run unit tests in Visual Studio 2010
  • Create and run an integration test
  • Migrate NUnit tests to MSTest (optional)
  • Install and use TestDriven.NET (optional)

MODULE 2: TEST DRIVEN DEVELOPMENT

This module introduces Test Driven Development (TDD) and explores the objections and benefits to the discipline.  Refactoring and discussion of how to work with legacy code are also part of this module.

Lessons

  • TDD explained
  • Objections vs. benefits
  • Refactoring
  • Working with legacy code

Lab Activities

  • The Bowling Kata
  • Understand legacy code (optional)
  • Use TDD with legacy code (optional)

MODULE 3: TDD PATTERNS AND PRACTICES

This module continues the discussion of TDD by introducing patterns and preferred practices around planning and writing unit tests.  Boundary and performance considerations are also explored.

Lessons

  • Design goals for testability
  • Good vs. bad unit tests
  • Performance tuning
  • Organizing test libraries

Lab Activities

  • Testing the sad path
  • Explore ways to improve testing performance

MODULE 4: DUMMIES, FAKES, STUBS, AND MOCKS

This module introduces various types of doubles and how they can be used to properly test a complex system.  Rhino.Mocks, a popular and free (BSD licensed) mocking framework is introduced.

Lessons

  • Doubles explained
  • Dummies
  • Fakes
  • Stubs
  • Mocks and mocking frameworks
  • Rhino.Mocks

Lab Activities

  • Implement doubles manually
  • Install and use Rhino Mocks to simplify testing

MODULE 5: ADDITIONAL UNIT TESTING FEATURES

This module examines additional unit testing features found in Visual Studio, including data-driven tests, test impact analysis, and code coverage.  Team Foundation Server's ability to define and run automated builds and unit tests will complete the discussion.

Lessons

  • Data-driven unit testing
  • Test impact analysis
  • Code coverage
  • Automate testing with Team Foundation Server

Lab Activities

  • Create a data-driven unit test
  • Use test impact analysis to recommend tests
  • Compute code coverage
  • Configure TFS to run automated unit tests (optional)

*Content, days, and times vary depending on your location. Please view the outline prior to purchase or contact the local center for more information.