Unit Testing
Unit Testing
Unit Testing
Establish methods for finding potential common code and the avoidance of redundant program elements
Define the ritual and steps therein by which a unit is admitted as a trustworthy public elopement. Create the
ceremony and the signs by which such units can be recognized
Educate the programming staff, group leaders, section heads and management as to the objective, subjective,
subsidiary and auxiliary goals of unit testing:
Subjective goals:
Programmer job satisfaction
Trust
Objective goals:
To prove there are bugs and not to prove the software is bug free
Establish clear guidelines for unit testing, defining not only minimum standards, but maximum standards too.
Reward the programmer's discovery of bugs-say "Great!" when a bug I discovered and brought to your attention.
Cheer when a bug is found instead of scowling.
Artificially formalize the conclusion of unit testing so that the mark thereof is tangible - make a ceremony out of
it, pass out certificates of merit or gold stars
Avoid guilt induction. Don't be judgemental.
Does the programs intention match the requirements?
Does the execution match the intentions?
Does the unit conform to published interface conventions and calling sequences?
Is the unit consistent to the data base?
Are all private data items (e.g. data objects not in the data dictionary) justified?
Are all absolute addresses, relative addresses, address modifications, and other potentially dangerous constructs
justified?
Does the unit meet performance and size objectives (if specified)?
Is the documentation complete and meaningful (rather than verbose but inadequate)?
Was the test plan published in advance?
Are all identified bugs corrected?
Was the test plan revised to reflect the correction?
Was regression testing done to verify the corrections?
Subsidiary goals:
Does the coding conform to published project style standards?
Are mnemonic and label conventions followed?
Auxiliary goals:
Start the bug counter. Unit testing, because it is formal, is the first place where reliable bug data can be gathered.
QA needs bug counts to predict system quality. Management needs bug counts to predict testing costs and duration,
and programmer quality.
Gather data on: bug types established by categories, bug severity, and bug correction costs.
Obtain feedback on the effectiveness of test techniques used, bug prevention methods employed, and quality
assurance efforts.
Revise estimates of labour, elapsed time, project completion costs, testing resource requirements, and testing
schedules.
Define in detail the minimum unit testing procedures and associated forms and documents
Establish a reward system for discovered bugs
Define the objective goals to be verified by programmers, group leaders and QA
Define QA data gathering formats and procedures that are effective but not obnoxious. Distribute collective results
periodically in a QA bulletin.
Define standards and procedures for testing partially complete code and for follow-up of incomplete units and