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

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.

[1]  C. Q. Lee,et al.  The Computer Journal , 1958, Nature.

[2]  James Lyle Peterson,et al.  Petri net theory and the modeling of systems , 1981 .

[3]  Peter Radford,et al.  Petri Net Theory and the Modeling of Systems , 1982 .

[4]  Procedures for Reducing the Size of Coverage-based Test Sets , 1995 .

[5]  Hong Zhu,et al.  Software unit test coverage and adequacy , 1997, ACM Comput. Surv..

[6]  Doo-Hwan Bae,et al.  Test cases generation from UML state diagrams , 1999, IEE Proc. Softw..

[7]  Ivar Jacobson,et al.  The Unified Modeling Language User Guide , 1998, J. Database Manag..

[8]  A. Jefferson Offutt,et al.  Generating Tests from UML Specifications , 1999, UML.

[9]  강문설 [서평]「The Unified Modeling Language User Guide」 , 1999 .

[10]  A. Jefferson Offutt,et al.  Using UML Collaboration Diagrams for Static Checking and Test Generation , 2000, UML.

[11]  Grigore Rosu,et al.  Monitoring Java Programs with Java PathExplorer , 2001, RV@CAV.

[12]  Diego Latella,et al.  A formal testing framework for UML statechart diagrams behaviours: from theory to automatic verification , 2001, Proceedings Sixth IEEE International Symposium on High Assurance Systems Engineering. Special Topic: Impact of Networking.

[13]  Heike Wehrheim,et al.  Jass - Java with Assertions , 2001, RV@CAV.

[14]  P. Chevalley,et al.  Automated generation of statistical test cases from UML state diagrams , 2001, 25th Annual International Computer Software and Applications Conference. COMPSAC 2001.

[15]  Mahesh Viswanathan,et al.  Java-MaC: a Run-time Assurance Tool for Java Programs , 2001, RV@CAV.

[16]  Diego Latella,et al.  On testing and conformance relations for UML statechart diagrams behaviours , 2002, ISSTA '02.

[17]  Mark Brörkens,et al.  Dynamic Event Generation for Runtime Checking using the JDI , 2002, Electron. Notes Theor. Comput. Sci..

[18]  Robert B. France,et al.  Test adequacy criteria for UML design models , 2003, Softw. Test. Verification Reliab..

[19]  Michael R. Lowry,et al.  Experiments with Test Case Generation and Runtime Analysis , 2003, Abstract State Machines.

[20]  Dirk Seifert,et al.  Test Case Generation for UML Statecharts , 2003, Ershov Memorial Conference.

[21]  Mary Jean Harrold,et al.  Test-Suite Reduction and Prioritization for Modified Condition/Decision Coverage , 2003, IEEE Trans. Software Eng..

[22]  Li Xuandong,et al.  Generating test cases from UML activity diagram based on Gray-box method , 2004 .

[23]  Guoliang Zheng,et al.  Generating test cases from UML activity diagram based on Gray-box method , 2004, 11th Asia-Pacific Software Engineering Conference.

[24]  James E. Rumbaugh,et al.  Object-Oriented Modeling and Design with UML , 2004 .

[25]  Diego Latella,et al.  Formal test-case generation for UML statecharts , 2004, Proceedings. Ninth IEEE International Conference on Engineering of Complex Computer Systems.

[26]  Tsong Yueh Chen,et al.  Identification of categories and choices in activity diagrams , 2005, Fifth International Conference on Quality Software (QSIC'05).

[27]  Marcelo d'Amorim,et al.  Event-based runtime verification of java programs , 2005, ACM SIGSOFT Softw. Eng. Notes.

[28]  Marcelo d'Amorim,et al.  Event-based runtime verification of java programs , 2005, WODA '05.

[29]  Rajesh Subramanyan,et al.  Automation of GUI testing using a model-driven approach , 2006, AST '06.

[30]  Mingsong Chen,et al.  Automatic test case generation for UML activity diagrams , 2006, AST '06.

[31]  Li Xuandong,et al.  Automatic test case generation for UML activity diagrams , 2006 .

[32]  Patrice Godefroid,et al.  Compositional dynamic test generation , 2007, POPL '07.