YoVDO

Visual Studio Essential Training: 09 Unit Tests

Offered By: LinkedIn Learning

Tags

Microsoft Visual Studio Courses Unit Testing Courses NUnit Courses Code Coverage Courses XUnit Courses

Course Description

Overview

Verify your code works as expected. Explore the process of creating and running unit tests with Visual Studio.

Syllabus

Introduction
  • Welcome
  • What you should know before watching
  • How to use the exercise files
1. Create a Simple Unit Test Framework
  • What are unit tests?
  • The anatomy of a unit test framework
  • Add the test projects
  • Analyze which tests to run
  • Create a simple test
  • Create a simple test runner
  • Add additional tests
  • Refactor the test runner
  • Create an Assert class
  • Use the Assert class
  • Add an attribute to the Assert class
  • Use reflection to call the test methods
2. Unit Testing Conventions
  • Choose a naming convention
  • The Arrange, Act, Assert test pattern
  • Understand pass-fail patterns
3. Work with Visual Studio Unit Testing Framework
  • Visual Studio and unit test integration
  • Choose a unit testing framework
  • Create a project with the unit test template
  • Create a project with the unit test framework: Visual Studio 2017
  • Create the unit test
  • Run the unit test
  • Modify code to pass test
  • Expected exceptions
  • Test parameters
4. Work with xUnit
  • Install xUnit
  • Create and run a unit test
  • Expected exceptions
  • Use App.config to shorten names in Test Explorer
  • Test parameters with InlineData
  • Test multiple parameters
  • Provide parameter values with a custom class member
5. Work with nUnit
  • Install nUnit
  • Create and run a unit test
  • Use the nUnit constraints
  • More nUnit constraints
  • Test parameters
6. Additional Topics
  • Group the test with test categories
  • Use additional test attributes
  • Get more from your tests
  • Customize the test runs with playlists
  • Debug unit tests
  • Use the test menus
  • View unit test results with CodeLens
  • Discover untested code with Code Coverage
  • Live unit testing
  • Run test from the command line with MSTest
Conclusion
  • Goodbye

Taught by

Walt Ritscher

Related Courses

Ruby on Rails: An Introduction
Johns Hopkins University via Coursera
Internet of Things Capstone: Build a Mobile Surveillance System
University of California, San Diego via Coursera
Engineering Maintainable Android Apps
Vanderbilt University via Coursera
Orientação a Objetos com Java
Instituto Tecnológico de Aeronáutica via Coursera
TDD – Desenvolvimento de Software Guiado por Testes
Instituto Tecnológico de Aeronáutica via Coursera