Abstract
Concurrency in application systems can be designed and visualized using concurrent activity diagrams. Such diagrams are useful to design concurrency test scenarios for testing. However, the number of test scenarios inside a fork-join construct could be exponential in size. The commonly used permutation technique generates all possible test scenarios, but it is exponential in size. Existing UML graph theoretic-based approaches generate a few test scenarios for concurrency testing. But they do not consider the full functionality of concurrent activity diagrams. In this work, we present two constrained permutation-based test scenario generation approaches, namely the level permutation and DFS level permutation for concurrent activity diagrams. These approaches restrict the exponential size to a reasonable size of test scenarios. It is achieved by generating a subset of permutations at different levels. The generated test scenarios are sufficient to uncover most concurrency errors like synchronization, data-race, and deadlocks. The proposed technique improves interleaving activity path coverage up to 35% compared to the existing approaches.
Similar content being viewed by others
Notes
Data Source: https://github.com/MaheshShirole/LevelPermutation
References
Ahmad T, Iqbal J, Ashraf A, Truscan D, Porres I (2019) Model-based testing using UML activity diagrams: a systematic mapping study. Comput Sci Rev 33:98–112. https://doi.org/10.1016/j.cosrev.2019.07.001
Albert M, Atkinson M (2005) Simple permutations and pattern restricted permutations. Discrete Math 300(1–3):1–15. https://doi.org/10.1016/j.disc.2005.06.016
Anbunathan R, Basu A (2019) Combining genetic algorithm and pairwise testing for optimised test generation from UML ADs. IET Softw 13:423–433. https://doi.org/10.1049/iet-sen.2018.5207
Atkinson M (1999) Restricted permutations. Discrete Math 195(13):27–38. https://doi.org/10.1016/S0012-365X(98)00162-9
Beizer B (1990) Software Testing Techniques, 2nd edn. Van Nostrand Reinhold Co., New York
Cartaxo E, Neto F, Machado P (2007) Test case generation by means of UML sequence diagrams and labeled transition systems. In: Proceedings of the IEEE international conference on systems, man and cybernetics, pp 1292–1297 (2007). https://doi.org/10.1109/ICSMC.2007.4414060
Chandler R, Lam CP, Li H (2005) AD2US: An automated approach to generating usage scenarios from UML activity diagrams. In: Proceedings of the 12th Asia-Pacific software engineering conference, pp 9–16 https://doi.org/10.1109/APSEC.2005.25
Dinh-Trong T, Ghosh S, France R (2006) A systematic approach to generate inputs to test UML design models. In: Proceedings of the 17th international symposium on software reliability engineering, pp 95–104 . https://doi.org/10.1109/ISSRE.2006.10
Dinning A, Schonberg E (1991) Detecting access anomalies in programs with critical sections. ACM SIGPLAN Notices 26(12):85–96. https://doi.org/10.1145/127695.122767
Kamonsantiroj S, Pipanmaekaporn L, Lorpunmanee S (2019) A memorization approach for test case generation in concurrent UML activity diagram. In: Proceedings of the 2nd international conference on geoinformatics and data analysis, pp 20–25. ACM Press https://doi.org/10.1145/3318236.3318256
Kim H, Kang S, Baik J, Ko I (2007) Test cases generation from UML activity diagrams. In: Proceedings of the 8th ACIS international conference on software engineering, artificial intelligence, networking, and parallel/distributed computing, pp 556–561 https://doi.org/10.1109/SNPD.2007.525
Knuth DE (2005) The Art of Computer Programming, Volume 4, Fascicle 2: Generating All Tuples and Permutations. Addison-Wesley Professional, Boston
Kundu D, Samanta D (2009) A novel approach to generate test cases from UML activity diagrams. J Object Technol 8(3):65–83. https://doi.org/10.5381/jot.2009.8.3.a1
Lamport L (1978) Time, clocks, and the ordering of events in a distributed system. Commun ACM 21(7):558–565. https://doi.org/10.1145/359545.359563
Lima L, Tavares A, Nogueira SC (2020) A framework for verifying deadlock and nondeterminism in UML activity diagrams based on CSP. Sci Comput Program. https://doi.org/10.1016/j.scico.2020.102497
Linzhang W, Jiesong Y, Xiaofeng Y, Jun H, Xuandong L, Guoliang Z (2004) Generating test cases from UML activity diagram based on gray-box method. In: Proceedings of the 11th Asia-Pacific software engineering conference, pp 284–291 https://doi.org/10.1109/APSEC.2004.55
Lu S, Park S, Zhou Y (2012) Finding atomicity-violation bugs through unserializable interleaving testing. IEEE Trans. Software Engineering 38(4):844–860. https://doi.org/10.1109/TSE.2011.35
Mingsong C, Xiaokang Q, Xuandong L (2006) Automatic test case generation for UML activity diagrams. In: Proceedings of the international workshop automation of software Test, pp 2–8. ACM https://doi.org/10.1145/1138929.1138931
OMG: UML superstructure v2.4.1 (2011). http://www.omg.org/spec/UML/2.4/Superstructure/PDF/
Shirole M, Kommuri M, Kumar R (2012) Transition sequence exploration of UML activity diagram using evolutionary algorithm. In: Proceedings of the 5th India software engineering conference, pp 97–100. ACM https://doi.org/10.1145/2134254.2134271
Shirole M, Kumar R (2012) Testing for concurrency in UML diagrams. SIGSOFT Softw Eng Notes 37(5):1–8. https://doi.org/10.1145/2347696.2347712
Shirole M, Kumar R (2021) Concurrency coverage criteria for activity diagrams. IET Software 15(1):43–54. https://doi.org/10.1049/sfw2.12009
Sun C, Zhang B, Li J (2009) TSGen: A UML activity diagram-based test scenario generation tool. In: Proceedings of the international conference on computational science and engineering, Vol 2, pp 853–858 https://doi.org/10.1109/CSE.2009.99
Süß M, Leopold C (2008) Common mistakes in OpenMP and how to avoid them: A collection of best practices. In: Proceedings of the International Conference on OpenMP shared memory parallel programming, pp 312–323. Springer-Verlag. https://doi.org/10.1007/978-3-540-68555-5_26
Thanakorncharuwit W, Kamonsantiroj S, Pipanmaekaporn L (2016) Generating test cases from UML activity diagram based on business flow constraints. In: Proc. 5th Int. Conf. Network, Communication & Computing, p. 155–160. ACM, New York, NY, USA https://doi.org/10.1145/3033288.3033311
Vaziri M, Tip F, Dolby J (2006) Associating synchronization constraints with data in an object-oriented language. ACM SIGPLAN Notices 41(1):334–345. https://doi.org/10.1145/1111320.1111067
Xu D, Li H, Lam CP (2005) Using adaptive agents to automatically generate test scenarios from the UML activity diagrams. In: Proceedings of the 12th Asia-Pacific software engineering conference, pp 385–392. IEEE Computer Society https://doi.org/10.1109/APSEC.2005.110
Yamada Y, Iwasaki H, Ugawa T (2011) SAW: Java synchronization selection from lock or software transactional memory. In: Proceedings of the 17th international conference on parallel and distributed systems, IEEE, pp 104–111 https://doi.org/10.1109/ICPADS.2011.112
Yimman S, Kamonsantiroj S, Pipanmaekaporn L (2017) Concurrent test case generation from UML activity diagram based on dynamic programming. In: Proceedings of the 6th international conference software and computer applications, pp 33–38. ACM Press https://doi.org/10.1145/3056662.3056699
Acknowledgements
The major part of this work was done, while the authors were at Indian Institute of Technology (IIT) Kharagpur. The authors thank the reviewers for their valuable comments. The authors are also thankful to the Editor-in-Chief, the Editor, and the Editorial Office Assistant(s) for managing this manuscript.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Shirole, M., Kumar, R. Constrained permutation-based test scenario generation from concurrent activity diagrams. Innovations Syst Softw Eng 17, 343–353 (2021). https://doi.org/10.1007/s11334-021-00389-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11334-021-00389-4