As a unit test, its importance is self-evident: it guarantees us to do the code refactoring after the correctness, can let us unscrupulous to modify our semi-finished products.
But as a developer or a new contact with unit test developers, how to test, to determine which aspects should be more confusing. What time is the usual work
Often need to use unit test to verify the function points, as a record, to facilitate their later writing unit test can be recalled:
Module Interface Test
Tested by the data flow of the module being measured. Whether the input parameters are matched to the number, attributes, and order of the module's formal parameters when the measured module is invoked.
Local Data structure test
The local data structure is to ensure that the data stored in the module is complete, correct and the local data structure of the module is often the source of the error in the program execution.
Path test
Test the important execution path in the module.
More Perfect module design requirements can meet the conditions of error, and set the appropriate error handling, so that once the program error, the error program can be rescheduled to ensure that its logical correctness.
Software often fails on convenience, boundary condition testing is a basic test, and it is also the focus of functional testing in later system testing.