Skip to Main Content
Coverage analysis is a structural testing technique, which helps to eliminate gaps in a test suite and determines when to stop testing. To compute test coverage, the paper proposes a gradation model, in which different coverage have different ranks, and the test coverage of the upper layer is compute according to the coverage of all the layers from the lowest to current layer and the rank difference. To distinguish the importance of different variables, the paper proposes a new concept - coverage about variables, based on program slicing, and adds powers according to their importance. Thus we can focus on the important variables to obtain higher test coverage. In most case, the coverage obtained by our method is bigger than that obtained by a traditional measure, because the coverage about a variable takes only the codes related into account, and the gradation model takes more factors into consideration when analyzing test coverage.