为了更好地分析测试基于组件的Web应用,并抉择何时结束测试过程,提出了覆盖率准则的概念和测试需求约简的方法.首先,定义了4种覆盖率准则,并证明它们之间的包含关系.然后,使用一种转换算法将Web应用测试模型转换成一种可以约简测试需求集合的Web应用决策-决策图(WADD图).最后,基于各种覆盖率准则,并通过分析图中各条边的等价和包含关系,约简测试需求集合.测试人员可以根据不同的测试环境需求选择不同测试需求集合.案例分析表明,在实际的Web应用中所定义的覆盖率准则确实存在线性包含关系.基于不同的测试覆盖率准则,测试需求集合平均可约简55%以上.随着覆盖率准则复杂度的提高,测试需求的规模也随之增大.
In order to analyze and test the component-based web application and decide when to stop the testing process, the concept of coverage criteria and test requirement reduction approach are proposed. First, four adequacy criteria are defined and subsumption relationships among them are proved. Then, a translation algorithm is presented to transfer the test model into a web application decision-to-decision graph(WADDGraph)which is used to reduce testing requirements. Finally, different sets of test requirements can be generated from WADDGraph by analyzing subsumption and equivalence relationships among edges based on different coverage criteria, and testers can select different test requirements according to different testing environments. The case study indicates that coverage criteria follow linear subsumption relationships in real web applications. Test requirements can be reduced more than 55% on average based on different coverage criteria and the size of test requirements increases with the increase in the complexity of the coverage criteria.