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.
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.
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.