UML Behavioral Model Based Test Case Generation: A Survey Mahesh Shirole Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Kharagpur WB 721302, India mrshirole@vjti.org.in Rajeev Kumar Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Kharagpur WB 721302, India rajeevkumar.cse@gmail.com ABSTRACT In software engineering, system modeling is the process of for- mulating a representation of a real system in an abstract way to understand its behavior. Software testing encourages reusing these models for testing purpose. This expedites the process of test case generation. UML structural and behavioral specification diagrams have been used by testing researchers for generation of test scenarios and test data. The aim of this survey is to improve the understanding of UML based testing techniques. We have focused on test case genera- tion from the behavioral specification diagrams, namely sequence, state chart and activity diagrams. We classify the various research approaches that are based on formal specifications, graph theo- retic, heuristic testing, and direct UML specification processing. We discuss the issues of test coverage associated with these ap- proaches. Categories and Subject Descriptors D.2.5 [Software Engineering]: Testing and Debugging -Testing tools (e.g., data generators, coverage testing); D.2.2 [Design Tools and Techniques]: State diagrams; D.2.4 [Software/Program Verification]: Model checking General Terms Algorithms, Design, Experimentation, Performance. Keywords Sequence Diagram, Activity Diagram, State Machine Diagram, Formal Specifications Based Testing, Graph Theoretic Testing, Heuristic Testing, Test Case Generation. 1. INTRODUCTION Over the past two decades, UML model-based testing has evolved to face challenges of large and complex industrial software sys- tems. The adaptation of UML specifications in software develop- ment has changed the way of development. It has also changed the way of testing processes. This allows curbing errors at the design phase. The execution of an object-oriented program typ- ically begins with the instantiation of some objects, and then a message is sent to one of the objects or to itself to perform the computation. These messages are expressed to represent a dy- namic view of the system in UML behavioral models. From the testing perspective, UML transition sequences from different arti- facts provide important information about messages, such as the sender/receiver object, associated parameters, and guard condi- tions. In this paper, a UML transition sequence is a message sequence in a sequence diagram, a transition sequence in a state machine diagram, or an activity sequence in an activity diagram. UML transition sequences offer early information about message sequences. Therefore, these UML transition sequences are the foundation of many test case generation techniques for the soft- ware under test (SUT). Model based testing research has evolved out of techniques such as finite state machines, labeled transition systems, message se- quence charts, and Petri nets to generate test cases for systems. Recently, UML has taken root in analyzing and designing large systems. Moreover, it is a de-facto standard both in software in- dustry and in academia. UML analysis and design are performed in many software projects. It is a standard modeling language for visually describing the structures and understanding the behav- iors of systems. UML comprises a diagram suite to express differ- ent aspects of large complex systems. Each diagram describes a different view of the implementation. UML transition sequences serve as a blue print for the software systems. Therefore, it is a natural choice to extend the same model for testing. To improve on conventional testing, the research community pro- posed automated testing. For the programs, a graph-theoretic complexity measure is presented by McCabe [1]. The McCabe complexity measures complexity of the program, and is used to limit structural testing. Chow [2] presented an approach for test- ing the correctness of control structures, which is modeled by a finite state machine. Jessop et al. [3] presented an automated directed graph model based testing approach. Static code analy- sis can provide control-flow and data-flow information. However, for testing the dynamic behaviors of object-oriented software, the traditional static view of code is not sufficient [4]. Therefore, the research community has investigated the use of different UML dynamic views for the test case generation. Structural and behavioral diagrams have been focused on by re- searchers for generation of test scenarios and data. Behavioral di- agrams assemble a variety of interactions and instantaneous states within a model as it executes over time. Several UML-based ap- proaches to software testing have been proposed [5–7]. Use Cases represent a simpler formalism for expressing functional require- ments, and they are explored for the test case generation [8–12]. UML class diagrams and use-case diagrams are not precise enough for model based testing, hence some additional description from dynamic behavioral models is needed [13]. Therefore, researchers have focused on behavioral models to generate test cases. For functional testing, extensive research in recent years has focused on behavioral models, like sequence diagrams [14–24], state ma- chine diagrams [25–39] and activity diagrams [40–55]. A few re- searchers have proposed test case generation approach using more than one behavioral diagram [56–60]. In this paper, we attempt to analyze different types of UML tran- sition sequence based research for automating test case genera- ACM SIGSOFT Software Engineering Notes Page 1 July 2013 Volume 38 Number 4 DOI: 10.1145/2492248.2492274 http://doi.acm.org/10.1145/ 2492248.2492274