It must be clear by now that preparing Unit Test Cases document (referred to as UTC hereafter) is an important task in Unit Testing activity. Having an UTC, which is complete with every possible test case, leads to complete Unit Testing and thus gives an assurance of defect-free Unit at the end of Unit Testing stage.

Think of following aspects while preparing Unit Test Cases:


* Expected Functionality

Write test cases against each functionality that is expected to be provided from the Unit being developed.


* Input values

Write test cases for each of the inputs accepted by the Unit.


* Output values

Write test cases to generate scenarios, which will produce all types of output values that are expected from the Unit.


* Screen / Report Layout

Screen Layout or web page layout and Report layout must be tested against the requirements. It should not happen that the screen or the report looks beautiful and perfect, but user wanted something entirely different! It should ensure that pages and screens are consistent.


* Path coverage

A Unit may have conditional processing which results in various paths the control can traverse through. Test case must be written for each of these paths.


* Assumptions

A Unit may assume certain things for it to function. For example, a Unit may need a database to be open. Then test case must be written to check that the Unit reports error if such assumptions are not met.


* Transactions:

In case of database applications, it is important to make sure that transactions are properly designed and no way inconsistent data gets saved in the database.


* Abnormal terminations:

Behavior of the Unit in case of abnormal termination should be tested.


* Error messages

Error messages should be short, precise and self-explanatory. They should be properly phrased and should be free of grammatical mistakes.


UTC Document Format