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

被引:29
作者
Chen, Mingsong [1 ]
Qiu, Xiaokang [1 ]
Xu, Wei [1 ]
Wang, Linzhang [1 ]
Zhao, Jianhua [1 ]
Li, Xuandong [1 ]
机构
[1] Nanjing Univ, Dept Comp Sci & Technol, State Key Lab Novel Software Technol, Nanjing 210093, Peoples R China
关键词
Software testing; test cases generation; UML activity diagrams; !text type='Java']Java[!/text;
D O I
10.1093/comjnl/bxm057
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
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.
引用
收藏
页码:545 / 556
页数:12
相关论文
共 28 条
[11]   Automated generation of statistical test cases from UML state diagrams [J].
Chevalley, P ;
Thévenod-Fosse, P .
25TH ANNUAL INTERNATIONAL COMPUTER SOFTWARE & APPLICATIONS CONFERENCE, 2001, :205-214
[12]   Formal test-case generation for UML statecharts [J].
Gnesi, S ;
Latella, D ;
Massink, M .
NINTH IEEE INTERNATIONAL CONFERENCE ON ENGINEERING COMPLEX COMPUTER SYSTEMS, PROCEEDINGS: NAVIGATING COMPLEXITY IN THE E-ENGINEERING AGE, 2004, :75-84
[13]   Compositional dynamic test generation (extended abstract) [J].
Godefroid, Patrice .
ACM SIGPLAN NOTICES, 2007, 42 (01) :47-54
[14]  
Havelund K., 2001, Electronic Notes in Theoretical Computer Science, V55, DOI 10.1016/S1571-0661(04)00253-1
[15]   Test-suite reduction and prioritization for modified condition/decision coverage [J].
Jones, JA ;
Harrold, MJ .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2003, 29 (03) :195-209
[16]  
Kim M., 2001, Electronic Notes in Theoretical Computer Science, V55, DOI 10.1016/S1571-0661(04)00254-3
[17]  
Kim Y. G., 1999, IEE Proceedings-Software, V146, P187, DOI 10.1049/ip-sen:19990602
[18]   A formal testing framework for UML statechart diagrams behaviours: From theory to automatic verification [J].
Latella, D ;
Massink, M .
SIXTH IEEE INTERNATIONAL SYMPOSIUM ON HIGH ASSURANCE SYSTEMS ENGINEERING, 2001, :11-22
[19]  
Latella D., 2002, ACM SOFTWARE ENG NOT, V27, P144
[20]  
Offutt J, 1999, LECT NOTES COMPUT SC, V1723, P416