Approval Tests for .NET

Test code that checks complex output can be difficult and time-consuming to write and also hard to maintain. This course will teach you how to use Approval Tests to use human intelligence to easily and quickly write tests that check complex output.
Course info
Level
Intermediate
Updated
Sep 16, 2020
Duration
2h 21m
Table of contents
Course Overview
An Introduction to Approval Tests
Verifying Complex Objects and Arrays with Approval Tests
Using Approval Tests Reporters
Testing Application View Rendering with Approval Tests
An Introduction to Refactoring Legacy Code with Approval Tests
Description
Course info
Level
Intermediate
Updated
Sep 16, 2020
Duration
2h 21m
Description

Complex output can be difficult to test and can result in more lines of test code being written. In this course, Approval Tests for .NET, you’ll gain the ability to easily create tests that work with complex output. First, you’ll explore how to assert on complex output of different kinds. Next, you’ll discover how to use human intelligence to judge if test output is correct. Finally, you’ll learn how to more safely refactor legacy code and check application view rendering. When you’re finished with this course, you’ll have the skills and knowledge of Approval Tests needed to write your own tests more easily.

About the author
About the author

With over 15 years experience, Jason Roberts is a Microsoft .NET MVP, freelance developer, and author.

More from the author
.NET Unit Testing with AutoFixture
Beginner
1h 59m
Aug 7, 2020
Mocking with Moq and xUnit
Beginner
2h 14m
May 26, 2020
More courses by Jason Roberts
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi, everyone. My name's Jason Roberts, and welcome to my course, Approval Tests for .NET. I'm a freelance developer and author. Test code can be difficult to write and hard to maintain when the results we're asserting are not complex, or they require human judgment to know if they are correct. Sometimes trying to use traditional assert code to verify complex output can result in bloated and hard to understand test code. In this course, we're going to learn how to make testing easier with the free, open source ApprovalTests library. Some of the major topics that we'll cover include the difference between traditional asserts and approval tests asserts, how to verify custom objects and object graphs, how to use human intelligence to verify test results, how to test application view rendering with approval tests, and how to start writing tests for legacy code before you start to refactor it. By the end of this course, you'll know how to use approval tests to more easily and quickly write tests that verify complex output. Before beginning the course, you should be familiar with the basics of unit testing and C#. I hope you'll join me on this journey to learn approval tests with the Approval Tests for .NET course, at Pluralsight.