UML Activity Diagram-Based Automatic Test Case Generation For Java Programs

UML Activity Diagram-Based Automatic Test Case Generation For Java Programs
复制标题

DOI:
10.1093/comjnl/bxm057
复制
发表时间:
2009-08
期刊:
Comput. J.
影响因子:
--
通讯作者:
Mingsong Chen;Xiaokang Qiu;W. Xu;Linzhang Wang;Jianhua Zhao;Xuandong Li
Mingsong Chen;Xiaokang Qiu;W. Xu;Linzhang Wang;Jianhua Zhao;Xuandong Li
中科院分区:
其他
文献类型:
--
作者:
Mingsong Chen;Xiaokang Qiu;W. Xu;Linzhang Wang;Jianhua Zhao;Xuandong Li

文献摘要

被引文献

相似文献

基于设计规格说明的测试用例生成是测试过程的重要组成部分。在本文中,统一建模语言的活动图作为设计规格。通过对活动图建立测试充分性准则,提出了一种自动生成Java程序测试用例的方法。该方法不是直接从活动图中获取测试用例,而是根据给定的测试充分性准则从一组随机生成的测试用例中选择测试用例。该方法首先根据活动图模型对待测Java程序进行插装,并随机生成大量的测试用例。然后,通过运行被插装的程序,我们获得相应的程序执行轨迹。最后,通过将这些迹线与活动图的行为进行匹配,根据给定的测试充分性准则选择一组精简的测试用例。这种方法也可以用来检查程序执行跟踪和活动图行为之间的一致性。
Test case generation based on design specifications is an important part of testing processes. In this paper, Unified Modeling Language activity diagrams are used as design specifications. By setting up several test adequacy criteria with respect to activity diagrams, an automatic approach is presented to generate test cases for Java programs. Instead of directly deriving test cases from activity diagrams, this approach selects test cases from a set of randomly generated ones according to a given test adequacy criterion. In the approach, we first instrument a Java program under testing according to its activity diagram model, and randomly generate abundant test cases for the program. Then, by running the instrumented program we obtain the corresponding program execution traces. Finally, by matching these traces with the behavior of the activity diagram, a reduced set of test cases are selected according to the given test adequacy criterion. This approach can also be used to check the consistency between the program execution traces and the behavior of activity diagrams.