Writing Highly Maintainable Unit Tests
This course will teach you how to develop maintainable and sustainable tests as your production code grows and develops.
What you'll learn
Take advantage of the knowledge this course gives you and get equipped with the theory and practical skills you need to start making test suites manageable for the life of your product. In this course, Writing Highly Maintainable Unit Tests, you'll learn advanced techniques in unit testing. First, you'll explore how to turn production code testable in the first place. Next, you'll discover how to make tests survive future implementation changes. Then, you'll learn how to avoid nearly all code duplications in tests. Finally, you'll design reusable testing libraries. By the end of this course, you'll process deep understanding that will make your tests better in many ways.
Table of contents
- The Problem of Choosing What to Test 4m
- Changing the Class to Support State Testing 6m
- Implementing a State Test 5m
- On Multiple Assertions in One Unit Test 6m
- Completing State Tests 2m
- Implementing an Interaction Test Through Derivation 6m
- Implementing an Interaction Test Through Interface 5m
- Understanding Regression 5m
- Summary 2m
- Understanding Possible Options When Deriving a Class 7m
- Introducing Base and Derived Test Classes 6m
- When Implementation Affects Abstraction 4m
- Separating Functional from Non-functional Requirements 4m
- Completing the Definition of Abstract Data Type 3m
- Inventing the Abstract-Test-Driven Development 8m
- Interface Tests in Light of the Liskov Substitution Principle 6m
- Summary 2m
- Implementing Inheritance 2m
- Using Abstract Unit Tests in TDD 4m
- TDD-style Interface Implementation 6m
- Applying TDD to Discover Missing Tests 5m
- A Word About Naming Classes and Interfaces 3m
- Refactoring a Class Covered by Abstract Tests 4m
- Writing Tests Against Abstract List 10m
- Discussing the Benefits of Base Tests Class 3m
- Summary 3m
- Inventing Design Pattern Tests 6m
- Implementing the Design Pattern Tests 3m
- Testing All Aspects of a Design Pattern 5m
- Defining Value-typed Semantic 4m
- Designing the Equality Tests 4m
- Defining Equality Testing Rules 5m
- Implementing Equality Testing Library 6m
- Using the Equality Testing Library 5m
- Summary 3m
- Discovering Impossible Tests 3m
- Understanding Error Conditions 4m
- Division of Exceptions 4m
- Defining Preconditions and Postconditions 5m
- Avoiding Condition Checks with Contracts 4m
- Inheriting Contracts 4m
- Applying Contracts to a Production Class 6m
- Asserting the Preconditions 3m
- Implementing Contracts in Production Code 5m
- Removing Superfluous Unit Tests 6m
- Summary 3m
- Course Summary 2m