...

/

FIR[S]T: [S]elf-Validating

FIR[S]T: [S]elf-Validating

This lesson will cover the importance of self-validation in writing tests.

Self-validation in writing unit tests is the most important part of the FIRST principle. This principle states that the tests should be written such that the developer won’t need to check them manually, regardless of whether they passed or not.

Below is a dialogue between a recently recruited developer and his manager:

Automating the tests

Tests aren’t tests unless they assert that things went as expected. We write unit tests to save time, not take more of our time. Manually verifying ...