A transformation‐based approach to testing concurrent programs using UML activity diagrams

Unified Modeling Language (UML) activity diagrams are widely used to model concurrent interaction among multiple objects. In this paper, we propose a transformation‐based approach to generating scenario‐oriented test cases for applications modeled by UML activity diagrams. Using a set of transformation rules, the proposed approach first transforms a UML activity diagram specification into an intermediate representation, from which it then constructs test scenarios with respect to the given concurrency coverage criteria. The approach then finally derives a set of test cases for the constructed test scenarios. The approach resolves the difficulties associated with fork and join concurrency in the UML activity diagram and enables control over the number of the resulting test cases. We further implemented a tool to automate the proposed approach and studied its feasibility and effectiveness using a case study. Experimental results show that the approach can generate test cases on demand to satisfy a given concurrency coverage criterion and can detect up to 76.5% of seeded faults when a weak coverage criterion is used. With the approach, testers can not only schedule the software test process earlier, but can also better allocate the testing resources for testing concurrent applications. Copyright © 2015 John Wiley & Sons, Ltd.

[1]  Debasish Kundu,et al.  A Novel Approach to Generate Test Cases from UML Activity Diagrams , 2009, J. Object Technol..

[2]  Robert B. France,et al.  Generating test cases from an OO model with an AI planning system , 1999, Proceedings 10th International Symposium on Software Reliability Engineering (Cat. No.PR00443).

[3]  Chang-ai Sun A Transformation-Based Approach to Generating Scenario-Oriented Test Cases from UML Activity Diagrams for Concurrent Applications , 2008, 2008 32nd Annual IEEE International Computer Software and Applications Conference.

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

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

[6]  Sungwon Kang,et al.  Test Cases Generation from UML Activity Diagrams , 2007, Eighth ACIS International Conference on Software Engineering, Artificial Intelligence, Networking, and Parallel/Distributed Computing (SNPD 2007).

[7]  Chiou Peng Lam,et al.  Using Anti-Ant-like Agents to Generate Test Threads from the UML Diagrams , 2005, TestCom.

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

[9]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[10]  Li Liuying,et al.  Test selection from UML Statecharts , 1999 .

[11]  Lionel C. Briand,et al.  Is mutation an appropriate tool for testing experiments? , 2005, ICSE.

[12]  Lionel C. Briand,et al.  Towards Automated Support for Deriving Test Data from UML Statecharts , 2003, UML.

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

[14]  Huowang Chen,et al.  Deriving software statistical testing model from UML model , 2003, Third International Conference on Quality Software, 2003. Proceedings..

[15]  Li Xuandong,et al.  UMLTGF: A Tool for Generating Test Cases from UML Activity Diagrams Based on Grey-Box Method , 2006 .

[16]  Luciano Baresi,et al.  Activity Diagrams , 2009, Encyclopedia of Database Systems.

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

[18]  Kai-Yuan Cai,et al.  Distribution-Aware Mutation Analysis , 2012, 2012 IEEE 36th Annual Computer Software and Applications Conference Workshops.

[19]  Ilka Philippow,et al.  UML-Based Statistical Test Case Generation , 2002, NetObjectDays.

[20]  Jin Li,et al.  TSGen: A UML Activity Diagram-Based Test Scenario Generation Tool , 2009, 2009 International Conference on Computational Science and Engineering.

[21]  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.

[22]  Richard J. Lipton,et al.  Hints on Test Data Selection: Help for the Practicing Programmer , 1978, Computer.

[23]  Tsong Yueh Chen,et al.  A Choice Relation Framework for Supporting Category-Partition Test Case Generation , 2003, IEEE Trans. Software Eng..

[24]  M. Aggarwal,et al.  Test Case Generation from UML State Machine Diagram: A Survey , 2012, 2012 Third International Conference on Computer and Communication Technology.

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

[26]  Jia-Guang Sun,et al.  Automated Test Data Generation Algorithm Based on Reversed Binary Tree , 2007 .

[27]  Alexander Pretschner,et al.  Model-Based Testing in Practice , 2005, FM.

[28]  MaYu-Seung,et al.  MuJava: an automated class mutation system , 2005 .

[29]  A. Jefferson Offutt,et al.  MuJava: an automated class mutation system , 2005, Softw. Test. Verification Reliab..

[30]  Z. Dai Model-Driven Testing with UML 2 . 0 , 2004 .

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

[32]  Zhichang Qi,et al.  Test selection from UML Statecharts , 1999, Proceedings Technology of Object-Oriented Languages and Systems (Cat. No.PR00393).

[33]  Dong Xu,et al.  Using adaptive agents to automatically generate test scenarios from the UML activity diagrams , 2005, 12th Asia-Pacific Software Engineering Conference (APSEC'05).

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

[35]  Myungchul Kim,et al.  Interoperability test suite derivation for communication protocols , 2000, Comput. Networks.

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