Skip to main content
Log in

Prioritizing test scenarios from UML communication and activity diagrams

  • Original Paper
  • Published:
Innovations in Systems and Software Engineering Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Similar content being viewed by others

References

  1. 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

  2. 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

  3. Kawanw N (2003) Fault detection effectiveness of UML design model test adequacy criteria. In: ISSRE

  4. Elbaum S, Malishevsky AG, Rothermel G (2000) Prioritizing test cases for regression testing. ACM SIGSOFT Softw Eng Notes 25(5):102–112

    Google Scholar 

  5. Elbaum S, Malishevsky AG, Rothermel G (2002) Test case prioritization: a family of empirical studies. IEEE Trans Softw Eng 28(2):159–182

    Google Scholar 

  6. Rothermel G, Untch RH, Chu C, Harrold MJ (2001) Prioritizing test cases for regression testing. Softw Eng 27(10):929–948

    Google Scholar 

  7. OMG (2005) Unified Modeling Language Specification, Version 2.0. Object Management Group. http://www.omg.org

  8. Andrews A, France R, Ghosh S, Craig G (2003) Test adequacy criteria for UML design models. Softw Test Verif Reliab 13:97–127

    Google Scholar 

  9. 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

  10. 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

    Google Scholar 

  11. Smith MD, Robson DJ (1992) A framework for testing object-oriented programs. J Object Oriented Program 5(3):45–53

    Google Scholar 

  12. Kim YG, Hong HS, Bae DH, Cha SD (1999) Test cases generation from UML state diagrams. J Softw Technol 146(4):187–192

    Google Scholar 

  13. Mall R (2003) Fundamentals of software engineering, 2nd edn. Prentice-Hall, Upper Saddle River

    Google Scholar 

  14. 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

  15. 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

  16. Samuel P, Mall R, Kanth P (2007) Automatic test case generation from UML communication diagrams. Inf Softw Technol 49:158–171

    Google Scholar 

  17. 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

  18. 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

  19. Swain SK, Mall R (2009) Test case generation using UML sequence and activity diagrams. Int J Comput Sci Commun Technol 1(2):91–100

    Google Scholar 

  20. 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

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

  22. 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

  23. Srivastava PR (2008) Test case prioritization. J Theor Appl Inf Technol 4(3):178–181

    Google Scholar 

  24. 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

  25. 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

  26. 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

  27. 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

  28. Cavarra C, Davies J (2004) A method for the automatic generation of test suites from object models. Inf Softw Technol 46(5):309–314

    Google Scholar 

  29. 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

  30. Object Management Group (2003) The Unified Modeling Language UML 1.5 Technical Report formal/03-03-01. The Object Management Group (OMG)

  31. Elbaum S, Rothermel G, Kanduri S, Malishevsky AG (2004) Selecting a cost-effective test case prioritization technique. Softw Qual J 185–210

  32. 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

  33. Li JJ, Weiss D, Yee H (2006) Code-coverage guided prioritized test generation. Inf Softw Technol 48(12):1187–1198

    Google Scholar 

  34. 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

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ranjita Kumari Swain.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11334-013-0228-5

Keywords

Navigation