Abstract
For automatic generation of test scenarios from UML (Unified Modeling Language) activity diagrams (ADs) are very important for improving test efficiency. However, state-of-the-art approaches mainly focus on simple approaches, without specifically considering the case of concurrent activity, which may result in the path explosion problem during the generation of test scenarios. In this paper, we put forward DFS-KeyLevel, a two-layer test scenario generation approach for UML Activity Diagram. First, the ADs of the software under test are modeled and preprocessed, and each concurrent module in each AD is simplified to a composite node. Then, primary test scenarios are generated from the concurrent activity modules using our proposed KeyLevel method. Next, the high-layer test scenarios are generated from the simplified AD with our improved Depth-First Search (DFS) algorithm. Finally, the primary and high-layer test scenarios are combined to generate the final test scenarios for the AD. The experimental results show that this DFS-KeyLevel is superior to the previous approaches. The DFS-KeyLevel can generate more test scenarios under constraints. Compared with DFS-LevelPermutes, the number of test scenarios generated by our DFS-KeyLevel is 1.13 times higher. Compared with Depth-First Search and Breadth-First Search (DFS-BFS) and Improved-DFS (IDFS), the DFS-KeyLevel produced 2.37 times test scenarios. The average coverage rates of staggered activities and total activity logical path coverage (TALPC) of the DFS-KeyLevel are 83.67% and 84% respectively, which is significantly higher than the above three approaches. In addition, when our method is applied to a real embedded system, it significantly reduces test scenarios generated to avoid path explosion while ensuring enough test scenarios.
Similar content being viewed by others
Data Availability
Some or all data, models, code generated or used during the study are available from the corresponding author by request.
Notes
References
Ahmad T, Iqbal J, Ashraf A (2019) Model-based testing using UML activity diagrams: a systematic mapping study. Comput Sci Rev 33:98–112
Anbunathan R, Basu A (2019) Combining genetic algorithm and pairwise testing for optimised test generation from UML ADs. Softw IET 13(5):423–433
Arora V, Singh M, Bhatia R (2020) Orientation-based ant colony algorithm for synthesizing the test scenarios in UML activity diagram. Inf Softw Technol 123:106292
Clarisó R, González CA, Cabot J (2019) Smart bound selection for the Verification of UML/OCL class diagrams. IEEE Trans Softw Eng 45(4):412–426
Fan LL, Wang Y, Liu T (2021) Automatic test path generation and prioritization using UML activity diagram. In: Proc. of 8th International Conference on Dependable Systems and Their Applications (DSA). pp 484–490
Hamza ZA, Hammad M (2019) Generating test sequences from UML use-case diagrams. In: Proc. of International Conference on Innovation and Intelligence for Informatics, Computing, and Technologies (3ICT), pp 1–6
Jahan H, Feng Z, Mahmud S (2020) Risk-based test case prioritization by correlating system methods and their associated risks. Arab J Sci Eng 45:6125–6138
Jain P, Soni D (2020) A survey on generation of test cases using UML diagrams. In: Proc. of International Conference on Emerging Trends in Information Technology and Engineering (IC-ETITE). IEEE, pp 1–6
Jena AK, Swain SK, Mohapatra DP (2014) A novel approach for test case generation from UML activity diagram. In: Proc. of International Conference on Issues & Challenges in Intelligent Computing Techniques. IEEE, pp 621–629
Kamonsantiroj S, Pipanmaekaporn L, Lorpunmanee S (2019) A memorization approach for test case generation in concurrent UML activity diagram. In: Proc. of the 2nd International Conference on Geoinformatics and Data Analysis, pp 20–25
Kundu D, Samanta D (2009) A novel approach to generate test cases from UML activity diagrams. J Object Technol 8(3):65–83
Lafi M, Alrawashed T, Hammad AM (2021) Automated test cases generation from requirements specification. In: Proc. of International Conference on Information Technology (ICIT). IEEE, pp 852–857
Li H, Lam CP (2005) Using anti-ant-like agents to generate test threads from the UML diagrams. In: Proc. of International Conference on Testing of Communicating Systems. Springer-Verlag, Berlin, pp 69–80
Lima L, Tavares A (2019) Verifying deadlock and nondeterminism in activity diagrams. In: Proc. of ACM/IEEE 22nd International Conference on Model Driven Engineering Languages and Systems Companion (MODELS-C). IEEE, pp 764–768
Mahali P, Arabinda S, Acharya AA (2016) Test case generation for concurrent systems using UML activity diagram. In: Proc. of IEEE Region 10 Conference (TENCON), pp 428–435
Mahanto P, Barisal SK, Mohapatra DP (2018) Achieving MC/DC using UML communication diagram. In: Proc. of International Conference on Information Technology (ICIT). IEEE, pp 73–78
OMG. Foundational Unified Modeling Language v1.5. http://www.omg.org/spec/FUML/1.5/. Retrieved June 2021
Panthi V, Tripathi A, Mohapatra DP (2022) Software validation based on prioritization using concurrent activity diagram. Int J Syst Assur Eng Manage 13:1801–1816
Qian Z, Zhu J, Zhu Y (2022) Multi-path coverage strategy combining key point probability and path similarity. J Softw 33:434–454
Salman, Yasir D (2017) Coverage criteria for test case generation using UML state chart diagram. AIP Conf Proc 1891(1):1–6
Shi Z, Zeng XQ, Zhang TT, Han L (2021) UML diagram-driven test scenarios generation based on the temporal graph grammar. KSII Trans Internet Inf Syst 15(7):2476–2495
Shirole M, Kumar R (2012) Testing for concurrency in UML diagrams. ACM SIGSOFT Softw Eng Notes 37(5):1–8
Shirole M, Kumar R (2021) Concurrency coverage criteria for activity diagrams. IET Softw 15(4):43–54
Shirole M, Kumar R (2021) Constrained permutation-based test scenario generation from concurrent activity diagrams. Innov Syst Softw Eng 17:345–353
Sypsas A, Kalles D (2020) Using UML AD for adapting experiments under a virtual laboratory environment. In: Proc of 24th Pan-Hellenic Conference on Informatics. Association for Computing Machinery, New York, pp 27–30
Thanakorncharuwit W, Kamonsantiroj S, Pipanmaekaporn L (2016) Generating test cases from UML activity diagram based on business flow constraints. In: Proc. of the Fifth International Conference on Network, Communication and Computing. pp 155–160
Tiwari RG, Srivastava AP, Bhardwaj G (2021) Exploiting UML diagrams for test case generation: a review. In: Proc. of the 2nd International Conference on Intelligent Engineering and Management (ICIEM), pp 457–460
Yed. https://www.yworks.com/products/yed. Accessed on 2022/9/2
Yimman S, Kamonsantiroj S, Pipanmaekaporn L (2017) Concurrent test case generation from UML activity diagram based on dynamic programming. In: Proc. of the 6th international conference on software and computer applications. pp 33–38
Funding
The work described in this paper is partially supported by the Chinese National Natural Science Foundation (grant number 11975182).
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of Interest/Competing Interest
The authors have no conflicts of interest to declare relevant to this article’s content.
Additional information
Responsible Editor: V. D. Agrawal.
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Du, X., Zhang, J., Chen, K. et al. DFS-KeyLevel: A Two-Layer Test Scenario Generation Approach for UML Activity Diagram. J Electron Test 39, 71–88 (2023). https://doi.org/10.1007/s10836-023-06045-y
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10836-023-06045-y