Skip to main Content

Test-Driven Development Using MSTest

  • Course Code M4006
  • Duration 1 day

Course Delivery

Company Event Price

Please call

Request Group Training Add to Cart

Course Delivery

This course is available in the following formats:

  • Company Event

    Event at company

  • Public Classroom

    Traditional Classroom Learning

  • Virtual Learning

    Learning that is virtual

Request this course in a different delivery format.

Course Overview

Top

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 2026, including the free Community version.

This course is designed to run on .NET 10.0, which is the current LTS (Long Term Support) version of .NET Core. .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.

 

Updated July 2026

Company Events

These events can be delivered exclusively for your company at our locations or yours, specifically for your delegates and your needs. The Company Events can be tailored or standard course deliveries.

Course Schedule

Top

Target Audience

Top

Developers with basic knowledge of .NET Core and experience programming in C# with Visual Studio who want to learn test-driven development and unit testing using MSTest

Course Objectives

Top

After this course participants should be able to:

  • 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

Course Content

Top

1. Test-Driven Development

  • What Is Test-Driven Development (TDD)?
  • Functional Tests / Customer Tests
  • Unit Tests / Programmer Tests
  • Test Automation
  • Simple Design
  • Refactoring
  • A Visual Studio Test Drive
  • TDD with Legacy Code

2. Visual Studio Unit Testing Fundamentals

  • Structure of Unit Tests
  • Unit Testing Framework
  • Assertions
  • Test Cases
  • Test Classes
  • Test Runners
  • Ignoring Tests
  • Initialization and Cleanup

3. More about MSTest Framework

  • Expected Exceptions
  • Custom Asserts
  • Playlists
  • Debugging Unit Tests
  • Command-line Test Runner
  • Refactoring

Course Prerequisites

Top

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.

Test Certification

Top

None

Follow on Courses

Top

None

Cookie Control toggle icon