June 2017
Beginner to intermediate
274 pages
6h 49m
English
First of all, let's find out what is a unit test. A unit test is a single small chunk of test code that tests correct behavior or a single specific flaw within an isolated small chunk of program code.
There are reasons for each part of this definition. A unit test is source code because one of the secrets of unit testing is that we put the maximum amount of the effort of testing on the computer, which is where it should belong.
The test code tells the computer how to perform the test, which allows us to perform the test often and easily. A unit test is small because a large test is almost inevitably testing for more than one thing.
This can be summarized as: