Introduction
Test your code in Visual Studio
()
What you should know
()
Further lessons and examples
()
Programming setup and configuration
()
How to access the sample code on GitHub
()
1. Unit Tests Overview
What topics are in this course?
()
What are unit tests?
()
Sample application to test
()
Sample code to test
()
The anatomy of a unit test framework
()
Common test naming conventions
()
Choose a test framework
()
Temporarily disable CodeLens
()
2. Unit Tests Basics with xUnit Framework
Add an xUnit project to solution
()
xUnit conventions and philosophy
()
Create test classes
()
Add test with the [Fact] attribute
()
Run the unit tests
()
3. Use Other xUnit Features
Example unit tests
()
Parameterized tests with [Theory]
()
Parameter values with [MemberData]
()
Parameter values with [ClassData]
()
Use precision parameter when testing floats
()
How to test for expected exceptions
()
4. Additional Visual Studio Test Features
View unit test results with CodeLens
()
Group the test with test categories
()
Debug unit tests
()
Tip: Clear the test list
()
Run predefined sets of tests
()
5. Visual Studio Enterprise Features
Analyze method test paths with code coverage
()
Analyze all code with code coverage
()
How exceptions affect code coverage statistics
()
Enable Live Unit Testing
()
Refactor code with Live Unit Testing
()
6. Unit Testing Tips
Tip: Run tests after each build
()
Tip: Group by duration or outcome
()
Tip: Filter test list
()
Tip: Save filters with playlists
()
7. Unit Tests with MSTest
Add a unit test project to a solution
()
MSTest examples
()
Run the unit tests in Test Explorer
()
Test for expected exceptions
()
Parameterized and data-driven tests
()