Generating test cases from UML activity diagram based on Gray-box method

Test case generation is the most important part of the testing efforts, the automation of specification based test case generation needs formal or semi-formal specifications. As a semi-formal modelling language, UML is widely used to describe analysis and design specifications by both academia and industry, thus UML models become the sources of test generation naturally. Test cases are usually generated from the requirement or the code while the design is seldom concerned, this paper proposes an approach to generate test cases directly from UML activity diagram using Gray-box method, where the design is reused to avoid the cost of test model creation. In this approach, test scenarios are directly derived from the activity diagram modelling an operation. Then all the information for test case generation, i.e. input/output sequence and parameters, the constraint conditions and expected object method sequence, is extracted from each test scenario. At last, the possible values of all the input/output parameters could be generated by applying category-partition method, and test suite could be systematically generated to find the inconsistency between the implementation and the design. A prototype tool named UMLTGF has been developed to support the above process.

[1]  Ivar Jacobson,et al.  The unified modeling language reference manual , 2010 .

[2]  Philippe Kruchten The Rational Unified Process - An Introduction, 3rd Edition , 2004, Addison Wesley object technology series.

[3]  Robert V. Binder,et al.  Testing Object-Oriented Systems: Models, Patterns, and Tools , 1999 .

[4]  Liu Chao,et al.  Automated Test Case Generation Based on UML Activity Diagram Model , 2001 .

[5]  Jean Hartmann,et al.  UML-Based integration testing , 2000, ISSTA '00.

[6]  A. Jefferson Offutt,et al.  UML-Based Integration Testing for Component-Based Software , 2003, ICCBSS.

[7]  Imran Bashir Testing Object-Oriented Software: Life-Cycle Solutions. By Imran Bashir and Amrit L. Goel. Published by Springer-Verlag, Berlin, Germany, 2000. ISBN: 0-387-98896-3, 209 pages. Price: U.K. £37, U.S.A. [dollar]54.95, Germany DM 108, Hard Cover , 2000 .

[8]  A. Bertolino,et al.  A Practical approach to UML-based derivation of integration tests , 2000 .

[9]  Cui Meng Formal Analysis on UML Real-Time Activity Diagram , 2004 .

[10]  Anneke Kleppe,et al.  MDA explained - the Model Driven Architecture: practice and promise , 2003, Addison Wesley object technology series.

[11]  Reiko Heckel,et al.  Towards Model-Driven Testing , 2003, TACoS.

[12]  P. Krutchen,et al.  The Rational Unified Process: An Introduction , 2000 .

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

[14]  Boris Beizer,et al.  Black Box Testing: Techniques for Functional Testing of Software and Systems , 1996, IEEE Software.

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

[16]  Paul C. Jorgensen,et al.  Software Testing: A Craftsman's Approach , 1995 .

[17]  Marc J. Balcer,et al.  The category-partition method for specifying and generating fuctional tests , 1988, CACM.

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