Levi, Ray & Shoup, Inc.
  • Courses
  • Site Content

ATUTVS2015 - Unit Testing in Visual Studio 2015

This two-day, instructor-led course provides students with the knowledge and skills to
effectively use Visual Studio 2015 to design, write, and run high-quality .NET unit tests. The course focuses on the applicable features and capabilities of Visual Studio as it relates to unit testing and Test-Driven Development. This course also introduces other popular unit testing tools and techniques, and demonstrates how they integrate with Visual Studio and your development lifecycle.

Click here to print this page »

Prerequisites


Before attending this course, a student should have experience or familiarity with:
The Visual C# language
Visual Studio 2012, 2013, or 2015
Writing, debugging, and maintaining code
Application Lifecycle Management basics
Building a high-quality software product
Their organization’s development lifecycle

Detailed Class Syllabus


Module 1: Unit Testing in .NET


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


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)


TDD overview and benefits
Practicing TDD within Visual Studio
Refactoring
Using CodeLens to support TDD and refactoring
Working with legacy code

Module 4: Writing Good Unit Tests


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


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


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