Test coverage criteria is a metric for assessing test quality. According to Myers, testing is the process of executing a program to detect errors. Therefore, test coverage criteria should be aimed at detecting errors. The coverage criterion measures the proportion of classes of situations whose representatives are in the test suite. The higher the level of test coverage, the more classes of situations are covered, the more errors can be detected.
Sources of information about program behavior:
- Source code of the program ( Code coverage ): The source code of the program itself is used as a source. Such testing is called white-box testing; knowledge of the internal structure of the program is used to create a set of tests.
- Input data structure: Source - logical features of the input data (for example, even numbers among all positive integers)
- Requirements ( Coverage of requirements ): Source - requirements for the program. The basis for dividing tests into classes regarding their verification of certain requirements for the program is the assumption that an error in the implementation of the requirement occurs during any verification of this requirement.
- Models: A formal model or specification of the behavior or structure of the system is used. The classes of test situations extracted from the model often refine the classes of situations defined on the basis of input data or requirements.
Literature
- Myers G. The Art of Testing Programs. M.: Finance and Statistics, 1982.
- Myers GJ , Badgett T. , Sandler C. , Thomas TM . The Art of Software Testing. John Wiley and Sons, 2004. ISBN 047167835X [1]
- Beizer B. Software Testing Techniques. International Thomson Press, 1990.