Abstract
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.
Similar content being viewed by others
References
Bertolino A, Basanieri F (2000) A practical approach to UML-based derivation of integration tests. In: Proceedings of the fourth international software quality week Europe and international internet quality week Europe (QWE), Brussels, Belgium
Ghosh S, France R, Braganza C, Kawane N, Andrews A, Pilskalns O (2003) Test adequacy assessment for UML design model testing. In: Proceedings of the international symposium on software reliability engineering. Denver, CO., pp 332–343
Kawanw N (2003) Fault detection effectiveness of UML design model test adequacy criteria. In: ISSRE
Elbaum S, Malishevsky AG, Rothermel G (2000) Prioritizing test cases for regression testing. ACM SIGSOFT Softw Eng Notes 25(5):102–112
Elbaum S, Malishevsky AG, Rothermel G (2002) Test case prioritization: a family of empirical studies. IEEE Trans Softw Eng 28(2):159–182
Rothermel G, Untch RH, Chu C, Harrold MJ (2001) Prioritizing test cases for regression testing. Softw Eng 27(10):929–948
OMG (2005) Unified Modeling Language Specification, Version 2.0. Object Management Group. http://www.omg.org
Andrews A, France R, Ghosh S, Craig G (2003) Test adequacy criteria for UML design models. Softw Test Verif Reliab 13:97–127
Linzhang W, Jiesong Y (2004) Generating test cases from UML activity diagram based on gray-box method. Proceedings of the 11th Asia-Pacific software engineering conference (APSEC04). IEEE, New York, pp 284–291
Chen HY, Tse TH, Chen TY (2001) Taccle: a methodology for object oriented software testing at the class and cluster levels. ACM Trans Softw Eng Methodol 10(4):56–109
Smith MD, Robson DJ (1992) A framework for testing object-oriented programs. J Object Oriented Program 5(3):45–53
Kim YG, Hong HS, Bae DH, Cha SD (1999) Test cases generation from UML state diagrams. J Softw Technol 146(4):187–192
Mall R (2003) Fundamentals of software engineering, 2nd edn. Prentice-Hall, Upper Saddle River
Offutt J, Abdurazik A (1999) Generating tests from UML specifications. Proceedings of the second international conference on UML. Lecture notes in computer science. Springer, Berlin, pp 416–429
Abdurazik A, Offutt J (2000) Using UML collaboration diagrams for static checking and test generation. In: Proceedings of the third international conference on the UML. Lecture notes in computer science, vol 939. Springer, York, pp 383–395
Samuel P, Mall R, Kanth P (2007) Automatic test case generation from UML communication diagrams. Inf Softw Technol 49:158–171
Kim H, Kang S, Baik J, Ko I (2007) Test cases generation from UML activity diagrams. In: 8th ACIS international conference on software engineering, artificial intelligence, networking and parallel/distributed computing (ACIS-SNPD). IEEE Computer Society, New York
Xu D, Li H, Lam CP (2007) A systematic approach to automatically generate test scenarios from UML activity diagrams. In: Third IASTED international conference on advances in computer science and technology
Swain SK, Mall R (2009) Test case generation using UML sequence and activity diagrams. Int J Comput Sci Commun Technol 1(2):91–100
Dinh Trong T (2003) Rules for generating code from UML collaboration diagram and activity diagrams. Master’s thesis. PhD thesis, Colorado State University, Fort Collins, Colorado
Dinh-Trong T, Ghosh S, France RB (2006) A systematic approach to generate inputs to test UML design models. In: 17th IEEE international symposium on software reliability engineering (ISSRE), Raleigh, North Carolina, USA, 6–10 November 2006
Pilskalns O, Andrews A, Ghosh S, France R (2003) Rigorous testing by merging structural and behavioral UML representations. In: Proceedings of the 6th international conference on the unified modeling language, San Francisco, pp 234–248
Srivastava PR (2008) Test case prioritization. J Theor Appl Inf Technol 4(3):178–181
Srikanth H (2004) Requirements-based test case prioritization. In: Student research forum at the 12th ACM SIGSOFT international symposium on the foundations of software engineerin
Srikanth H, Williams L (2005) On the economics of requirements-based test case prioritization. In: Proceedings of the seventh international workshop on economics-driven software engineering research
Dinh Trong T (2004) A systematic approach to testing design models. Doctoral symposium, 7th international conference on the unified modeling language. Lisbon, Portugal, pp 10–15
Jeffrey D, Gupta N (2006) Test case prioritization using relevant slices. International computer software and applications conference (COMPSAC), Washington. DC. IEEE, New York, pp 411–420
Cavarra C, Davies J (2004) A method for the automatic generation of test suites from object models. Inf Softw Technol 46(5):309–314
Fraikin F, Leonhardt T (2000) Seditec-testing based on sequence diagrams. Proceedings 17th IEEE international conference on automated software engineering. IEEE Computer Society, New York, pp 261–266
Object Management Group (2003) The Unified Modeling Language UML 1.5 Technical Report formal/03-03-01. The Object Management Group (OMG)
Elbaum S, Rothermel G, Kanduri S, Malishevsky AG (2004) Selecting a cost-effective test case prioritization technique. Softw Qual J 185–210
Korel B, Koutsogiannakis G, Tahat LH (2007) Model-based test prioritization heuristic methods and their evaluation. In: International workshop on advances in model-based testing. ACM, New York
Li JJ, Weiss D, Yee H (2006) Code-coverage guided prioritized test generation. Inf Softw Technol 48(12):1187–1198
Korel B, Tahat LH, Harman M (2005) Test prioritization using system models. IEEE International conference on software maintenance (ICSM). IEEE Computer Society, Washington, DC, pp 559–568
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Swain, R.K., Panthi, V., Mohapatra, D.P. et al. Prioritizing test scenarios from UML communication and activity diagrams. Innovations Syst Softw Eng 10, 165–180 (2014). https://doi.org/10.1007/s11334-013-0228-5
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11334-013-0228-5