摘要
为了更好地完成面向对象软件测试中的集成测试,提出了一种基于UML类图的面向对象软件集成测试方法。首先从UML类图的文件中利用RationalRose提供的接口将类图中的类内信息、类间信息提取出来,并计算每个类的内聚度以及类间耦合度,同时把每个类看作有向图的结点,类的内聚度、类间耦合度的加权作为节点的权值,类间关系的出度作为关系的权值。根据动态绑定的特点,在图中添加类间可能存在的动态绑定线索;然后,遍历该动态对象赋权图生成集成测试的测试序列;最后对生成的序列进行筛选,得出最有效的测试序列。实验证明该方法是有效的。
In this paper, an object-oriented (OO) software integrated testing approach based on UML class diagram is presented to complete the integrated testing of OO software perfectly. The class content and messages between classes are extracted from UML class diagram file by using the interface provided by RationalRose. The coherence of each class and coupling factor between classes are calculated. Each class is taken as the node of directed weight graph, the weight of the class coherence and the coupling factor between classes as the nodeJs weight value, and the out-degree of relation between classes as the weight value of the relation. The dynamic binding clues which possibly exists between classes are added into the diagram according to the features of dynamic banding, this dy- namic object directed weight graph is traveled to generate the integrated testing sequence. The sequence are screened to get more valid results. The experiments proved the effectiveness of the method.
出处
《现代电子技术》
2012年第18期38-40,共3页
Modern Electronics Technique