Abstract:The specification-based testing can be used to test software functions without knowing program code. Decisions are the main form of the pre- and post-conditions in formal specifications. This work analyzes logic coverage testing criteria for specification-based testing. It proposes and analyzes in detail masking logic coverage testing criteria, to solve the problems that the existent determinant logic coverage testing criteria can not solve. A feasible test case generation algorithm based on the masking logic coverage testing criteria is presented. The test cases satisfying the masking logic coverage testing criteria can detect those errors caused by the masking property of conditions. It also analyzes the constraints among conditions, how to decompose and compose a complicated decision, and the relationship among decisions. These can respectively clarify the coupling problem among conditions, the multiple occurrences of a condition in a decision, and the position problem of decisions in a program. Additionally, test criteria including full true decision coverage, full false decision coverage, all sub-decisions coverage, unique condition true coverage and unique condition false coverage are proposed. The test sets satisfying these criteria can detect respectively different types of errors. Finally, the subsumption relation graph among these testing criteria is presented and different applicable scenarios for different testing criteria are suggested.