Test-Driven Development Using Visual Studio and MSTest

Test-Driven Development Using Visual Studio and MSTest Courseware (4006)

An emerging software engineering paradigm is test-driven development, where tests are written early and testing is performed continuously during the development process. Problems are discovered early and corrected when they are found. This one-day course for developers explains the methodology of test-driven development and the use of Microsoft’s MSTest unit testing framework that comes with Visual Studio 2022, including the free Community version.

This course is designed to run on .NET 6.0, which is the latest version of .NET Core and is the main implementation of .NET going forward. .NET Core is a package-based implementation that is cross-platform, running on Mac and Linux besides Windows. .NET Framework 4.x continues to be supported. Object Innovations course 4106 covers unit testing on .NET 4.x.

The course is practical, with many example programs and tests written in C#, including a cumulative case study. The goal is to quickly bring you up to speed in doing unit testing in your .NET development projects. The student will receive a comprehensive set of materials, including course notes and all the programming examples.


  • Understand the principles of test-driven development
  • Acquire fluency in developing tests using the Visual Studio unit testing framework
  • Efficiently exercise test suites using Visual Studio and MSTest


  1. Test-Driven Development
    1. What is Test-Driven Development (TDD)?
    2. Functional tests / Customer tests
    3. Unit tests / Programmer tests
    4. Test automation
    5. Simple design
    6. Refactoring
    7. A Visual Studio test drive
    8. TDD with legacy code
  2. Visual Studio Unit Testing Fundamentals
    1. Structure of unit tests
    2. Unit testing framework
    3. Assertions
    4. Test cases
    5. Test classes
    6. Test runners
    7. Ignoring tests
    8. Initialization and cleanup
  3. More about MSTest Framework
    1. Expected exceptions
    2. Custom asserts
    3. Playlists
    4. Debugging unit tests
    5. Command-line test runner
    6. Refactoring

Required Prerequisites

The student should have a basic knowledge of .NET Core and experience programming in C# with Visual Studio.

Useful Prerequisites

Useful prior Object Innovations courses are Object-Oriented Programming in C# or C# Essentials plus .NET Foundations.


Length: 1 day | $40.00 per copy

LicenseRequest More InformationDownload Sample CopyRequest Trainer Evaluation Copy
What is Included?
  • Student Manual
  • Student Class Files
  • Extra Trainer Files
  • PowerPoint Presentation