Writing Maintainable Unit Tests
4.6 (6 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
18 students enrolled

Writing Maintainable Unit Tests

Master the art of loosely coupled unit tests
4.6 (6 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
18 students enrolled
Created by Jan Van Ryswyck
Last updated 2/2020
English
English [Auto-generated]
Current price: $139.99 Original price: $199.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 3 hours on-demand video
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • How to apply the test pyramid
  • Learn about state and behaviour verification
  • Understand and apply the DRY, SRP and DAMP principles
  • How to organise unit tests
  • Build loosely coupled unit tests
  • Provide intentful assertions and observations
Course content
Expand all 41 lectures 03:11:43
+ Types Of Automated Tests
7 lectures 31:32
Solitary Versus Sociable Tests
03:24
State Versus Behaviour Verification
05:56
Test-Driven Development
04:13
Summary
00:32
+ Maintainable Unit Tests
7 lectures 18:17
Clean Unit Tests
02:22
The DRY Principle
06:04
The Single Responsibility Principle
03:00
The DAMP Principle
04:44
Other Characteristics Of Maintainable Unit Tests
01:38
Summary
00:15
+ The Anatomy Of Unit Tests
9 lectures 28:39
Introduction
00:21
Arrange, Act, Assert
04:02
AAA Per Test Method
01:04
Single Assert Per Test
04:30
Avoid SetUp / TearDown
04:26
AAA Per Test Class
08:14
Assert Last Principle
01:22
Naming Unit Tests
04:04
Summary
00:36
+ Decoupling Patterns
11 lectures 01:25:01
Introduction
01:40
Only Test Public Interfaces
02:51
Object Mother
10:52
Test Data Builder
12:18
State Versus Behaviour Verification
11:48
Indirect Inputs and Outputs
05:36
Test Doubles
21:42
Subject Under Test Builder
04:16
Auto Mocking Container
05:52
Fixture Object
07:18
Summary
00:48
+ Assertions And Observations
6 lectures 27:20
Introduction
00:31
Clear Observations
04:30
Only Asserts Should Fail a Test
02:12
Single Assert Per Test
04:00
Procedural vs Object State Verification
15:39
Summary
00:28
Requirements
  • A decent understanding of an object-oriented programming language, preferrably C# or Java.
  • At the very least some first experiences writing unit tests for production code.
  • Basic or intermediate knowledge of xUnit test frameworks (e.g. NUnit, JUnit, xUnit, ...).
  • Basic or intermediate knowledge of mocking frameworks in general.
Description

Are unit tests causing you pain? Are they constantly failing whenever you make changes to your production code? Do you spend a lot of time fixing them when they break? Are they difficult to set up and run? Do you have a hard time maintaining or structuring your unit test code? Are they causing you headaches from time to time? Are you ready to give up on writing unit tests or have you already done so?

Or do you just want to step up your game and want to learn more about how to write readable and maintainable unit tests?

This course is for software developers who want to improve upon their existing skills for writing unit tests. By the end of this course, students will have gained the knowledge to build loosely coupled, highly maintainable and robust unit tests that are trustworthy and improve the overall code quality of your software applications. The content of this course is based on 15+ years of experience with Test-Driven Development. This knowledge is essential for becoming a senior-level software developer or a technical lead.

Although the examples that are used throughout this course are written in C#, the principles and guidance discussed here are broadly applicable to other platforms and programming environments as well. So students will be able to universally apply this knowledge throughout the rest of their careers as software developers.


Who this course is for:
  • This course is for software developers who want to improve upon their existing skills for writing readable and maintainable unit tests.