[header] How to write unit tests [title] Map your program into units. [step] The key aspect of a good unit test is that it checks just one portion of a program. Whether you are looking to test an existing program, or planning tests for a program that isn't written yet, you'll need to break it down into discrete parts (" units "). 
You'll then write a unit test for each one. [substeps] The definition of a " unit " varies widely depending on the type of program you are developing.