Module 1: Unit Testing in .NET
This module introduces the concepts of unit testing and
how it is supported by various unit testing frameworks and
tools for .NET, including MSTest and NUnit. The anatomy
of a unit test is also detailed in this module.
-
The role of the developer
-
Unit tests explained
-
.NET unit testing frameworks
-
MSTest, NUnit, xUnit.net, and others
-
The anatomy of a unit test
-
Writing your first unit test
Module 2: Unit Testing in Visual Studio
This module introduces Visual Studio test projects, Test
Explorer and other testing windows, and the functionality
for effectively writing and running unit tests and managing
test results.
-
Testing support in Visual Studio
-
Test projects
-
Test Explorer and other windows
-
Unit testing in Visual Studio
-
Running tests
-
Managing test results
-
Managing a large number of tests
Module 3: Test-Driven Development (TDD)
This module introduces Test Driven Development (TDD)
and the business case for why you should practice it.
Refactoring as well as a discussion of how to work with
legacy code are also part of this module.
-
TDD overview and benefits
-
Practicing TDD within Visual Studio
-
Refactoring
-
Using CodeLens to support TDD and refactoring
-
Working with legacy co0
Module 4: Writing Good Unit Tests
Just knowing how to write unit tests and being disciplined
in TDD is not enough. This module introduces several
other practices for ensuring that you write high-quality
unit tests that cover more than just the happy path.
-
Know your code
-
Path testing (i.e. sad path)
-
Right BICEP
-
Testing for expected exceptions
-
Maintaining high-quality test code
-
Unit test naming conventions (e.g. BDD)
-
Organizing unit tests
Module 5: Advanced Unit Testing in Visual Studio
This module examines additional unit testing features
found in Visual Studio, including code coverage, datadriven
unit tests, and continuous testing tools.
-
Code coverage
-
Using code coverage as a metric
-
Data-driven unit tests
-
Continuous testing in Visual Studio
-
Concurrent testing using Ncrunch
Module 6: Testing Difficult Code
This module introduces some tools and techniques for
testing difficult code, such as code that can’t be tested
without being hosted in another environment (e.g.
ASP.NET, SharePoint, etc.)
-
The need to isolate code under test
-
Doubles (dummies, stubs, fakes, and mocks)
-
Microsoft Fakes framework (stubs and shims)
-
Mocking frameworks (Rhino Mocks)
-
Profiling slow running unit tests
-
Using IntelliTest with legacy code