Prioritizing test scenarios from UML communication and activity diagrams

Due to the large size and complexity of software, exhaustive testing becomes impossible. Hence, testing must be done in an optimized way keeping in mind factors, such as requirements of the customer, cost and time. For this, there is a need to generate test cases and exercise them to gain maximum throughput by uncovering defects. Test case/scenario prioritization is a well known and efficient technique to ensure the software quality. Prioritization of test scenarios helps in early detection of bugs. In this paper, we present an integrated approach and a prioritization technique to generate cluster-level test scenarios from UML communication and activity diagrams. In our approach, we first construct a tree representation of communication diagrams, and then a tree representation of activity diagrams. We convert them into an intermediate tree named as COMMACT tree. We, then carry out a post-order traversal of the constructed tree for selecting conditional predicates from the intermediate tree. Then, we propose an algorithm to generate test scenarios from the constructed tree. Next, the necessary information, such as method-activity sequence, associated objects, and constraint conditions is extracted from test scenario. The test sequences are a set of theoretical paths starting from initialization to end, while taking conditions (pre- and post-condition) into consideration. Each generated test sequence corresponds to a particular scenario of the considered use case. The third phase is to generate test scenarios from the tree satisfying the message–activity path test adequacy criteria. Preliminary results obtained on a case-study indicate that the technique is effective in extracting the critical scenarios from the communication and activity diagrams. Our approach generates redundant test scenarios and still achieves adequate test coverage.

[1]  Gurkarandesh Kaur,et al.  Test Case Generation Using UML Diagram , 2015 .

[2]  Philip Samuel,et al.  Automatic test case generation from UML communication diagrams , 2007, Inf. Softw. Technol..

[3]  Gregg Rothermel,et al.  Test case prioritization , 2004 .

[4]  Robert B. France,et al.  Test adequacy assessment for UML design model testing , 2003, 14th International Symposium on Software Reliability Engineering, 2003. ISSRE 2003..

[5]  Bogdan Korel,et al.  Model-based test prioritization heuristic methods and their evaluation , 2007, A-MOST '07.

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

[7]  D. J. Robson,et al.  A framework for testing object-oriented programs , 1992 .

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

[9]  Hema Srikanth,et al.  On the Economics of Requirements-Based Test Case Prioritization , 2005 .

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

[11]  Neelam Gupta,et al.  Test Case Prioritization Using Relevant Slices , 2006, 30th Annual International Computer Software and Applications Conference (COMPSAC'06).

[12]  Tarun Jaiswal,et al.  Fundamentals of Software Engineering , 2017, Lecture Notes in Computer Science.

[13]  Ivar Jacobson,et al.  Unified Modeling Language , 2020, Definitions.

[14]  Falk Fraikin,et al.  SeDiTeC-testing based on sequence diagrams , 2002, Proceedings 17th IEEE International Conference on Automated Software Engineering,.

[15]  Jim Davies,et al.  A method for the automatic generation of test suites from object models , 2003, SAC '03.

[16]  Gregg Rothermel,et al.  Selecting a Cost-Effective Test Case Prioritization Technique , 2004, Software Quality Journal.

[17]  Tsong Yueh Chen,et al.  TACCLE: a methodology for object-oriented software testing at the class and cluster levels , 2001, TSEM.

[18]  Praveen Ranjan Srivastava TEST CASE PRIORITIZATION , 2008 .

[19]  Sungwon Kang,et al.  Test Cases Generation from UML Activity Diagrams , 2007 .

[20]  Dong Xu,et al.  A systematic approach to automatically generate test scenarios from UML activity diagrams , 2007 .

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

[22]  Laurie A. Williams,et al.  On the economics of requirements-based test case prioritization , 2005, ACM SIGSOFT Softw. Eng. Notes.

[23]  David M. Weiss,et al.  Code-coverage guided prioritized test generation , 2006, Inf. Softw. Technol..

[24]  Robert B. France,et al.  A Systematic Approach to Generate Inputs to Test UML Design Models , 2006, 2006 17th International Symposium on Software Reliability Engineering.

[25]  Requirements-Based Test Case Prioritization , 2004 .

[26]  Gregg Rothermel,et al.  Prioritizing test cases for regression testing , 2000, ISSTA '00.

[27]  Gregg Rothermel,et al.  Test Case Prioritization: A Family of Empirical Studies , 2002, IEEE Trans. Software Eng..

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

[29]  Mark Harman,et al.  Test prioritization using system models , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

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

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

[32]  Nilesh Kawane Fault Detection Effectiveness of UML Design Model Test Adequacy Criteria , 2003 .

[33]  Rajib Mall Fundamentals of Software Engineering , 2004, FSEN 2013.

[34]  Robert B. France,et al.  Rigorous Testing by Merging Structural and Behavioral UML Representations , 2003, UML.