Special offers now — see discounted courses.
day
:
hour
:
min
:
sec
See special offers
Visual Studio Deep Dive: Unit Tests

Visual Studio Deep Dive: Unit Tests

2h 14mIntermediate2021-08-06

Authors

Walt Ritscher

Walt Ritscher

Programmer, UI Designer, Staff Instructor at LinkedIn Learning

Course details

If you are a responsible programmer, you regularly test your code to make sure it behaves the way you expect it to behave. Unit tests are the most common type of developer test, and most programmers rely on a unit test framework to create and run those tests. In this course, Walt Ritscher takes a deep dive into the unit test tools available in Visual Studio. Walt gives an overview of unit tests and how they integrate with Visual Studio, then takes a deeper look into unit tests with MSTest and xUnit framework and how each is fully integrated into the Visual Studio Test Explorer, He also reviews additional Visual Studio test features like CodeLens, Live Unit Testing, and code coverage.

Skills covered

Visual StudioSoftware TestingWeb Development ToolsSoftware Development ToolsWeb DevelopmentMicrosoftSoftware DevelopmentOne-Off

Concepts

0. Introduction

  • 01 - Test your code in Visual Studio
  • 02 - What you should know
  • 03 - Further lessons and examples
  • 04 - Programming setup and configuration
  • 05 - How to access the sample code on GitHub

1. Unit Tests Overview

  • 06 - What topics are in this course
  • 07 - What are unit tests
  • 08 - Sample application to test
  • 09 - Sample code to test
  • 10 - The anatomy of a unit test framework
  • 11 - Common test naming conventions
  • 12 - Choose a test framework
  • 13 - Temporarily disable CodeLens

2. Unit Tests Basics with xUnit Framework

  • 14 - Add an xUnit project to solution
  • 15 - xUnit conventions and philosophy
  • 16 - Create test classes
  • 17 - Add test with the Fact attribute
  • 18 - Run the unit tests

3. Use Other xUnit Features

  • 19 - Example unit tests
  • 20 - Parameterized tests with Theory
  • 21 - Parameter values with MemberData
  • 22 - Parameter values with ClassData
  • 23 - Use precision parameter when testing floats
  • 24 - How to test for expected exceptions

4. Additional Visual Studio Test Features

  • 25 - View unit test results with CodeLens
  • 26 - Group the test with test categories
  • 27 - Debug unit tests
  • 28 - Tip - Clear the test list
  • 29 - Run predefined sets of tests

5. Visual Studio Enterprise Features

  • 30 - Analyze method test paths with code coverage
  • 31 - Analyze all code with code coverage
  • 32 - How exceptions affect code coverage statistics
  • 33 - Enable Live Unit Testing
  • 34 - Refactor code with Live Unit Testing

6. Unit Testing Tips

  • 35 - Tip - Run tests after each build
  • 36 - Tip - Group by duration or outcome
  • 37 - Tip - Filter test list
  • 38 - Tip - Save filters with playlists

7. Unit Tests with MSTest

  • 39 - Add a unit test project to a solution
  • 40 - MSTest examples
  • 41 - Run the unit tests in Test Explorer
  • 42 - Test for expected exceptions
  • 43 - Parameterized and data-driven tests

Conclusion

  • 44 - Next steps

Related courses

Related learn paths

About us

LyndaKade is a leading learning platform that helps people learn business, software, technology, and creative skills to achieve personal and professional goals.

Phone numberAparat ChannelTelegram SupportTelegram ChannelInstagram Page

All rights to this site belong to LyndaKade.

Terms of Service|Privacy Policy

نماد الکترونیک enamad در صورت اتصال با آی‌پی داخل کشور، نمایش داده خواهد شد.
logo-samandehi - لوگو ساماندهی
zarinpal
zibal