Vol.67, No.2, 2021, pp.2321-2336, doi:10.32604/cmc.2021.013014
Test Case Generation from UML-Diagrams Using Genetic Algorithm
  • Rajesh Kumar Sahoo1, Morched Derbali2,*, Houssem Jerbi3, Doan Van Thang4, P. Pavan Kumar5, Sipra Sahoo6
1 Department of Computer Science & Engineering, Ajay Binay Institute of Technology, Cuttack, 753014, India
2 Department of Information Technology, Faculty of Computing and IT, King Abdulaziz University, Jeddah, 21589, Saudi Arabia
3 Department of Industrial Engineering, University of Ha’il, College of Engineering, Hail, 2440, Saudi Arabia
4 Faculty of Information Technology, Industrial University of Ho chi Minh City, 700000, Vietnam
5 Department of Computer Science and Engineering, FST, IFHE, Hyderabad, 501203, India
6 Department of Computer Science and Engineering, ITER, SOA Deemed to be University, Bhubaneswar, 751030, India
* Corresponding Author: Morched Derbali. Email:
(This article belongs to this Special Issue: Emerging Computational Intelligence Technologies for Software Engineering: Paradigms, Principles and Applications)
Received 30 August 2020; Accepted 20 December 2020; Issue published 05 February 2021
Software testing has been attracting a lot of attention for effective software development. In model driven approach, Unified Modelling Language (UML) is a conceptual modelling approach for obligations and other features of the system in a model-driven methodology. Specialized tools interpret these models into other software artifacts such as code, test data and documentation. The generation of test cases permits the appropriate test data to be determined that have the aptitude to ascertain the requirements. This paper focuses on optimizing the test data obtained from UML activity and state chart diagrams by using Basic Genetic Algorithm (BGA). For generating the test cases, both diagrams were converted into their corresponding intermediate graphical forms namely, Activity Diagram Graph (ADG) and State Chart Diagram Graph (SCDG). Then both graphs will be combined to form a single graph called, Activity State Chart Diagram Graph (ASCDG). Both graphs were then joined to create a single graph known as the Activity State Chart Diagram Graph (ASCDG). Next, the ASCDG will be optimized using BGA to generate the test data. A case study involving a withdrawal from the automated teller machine (ATM) of a bank was employed to demonstrate the approach. The approach successfully identified defects in various ATM functions such as messaging and operation.
Genetic algorithm; generation of test data and optimization; state-chart diagram; activity diagram; model-driven approach
Cite This Article
R. K. Sahoo, M. Derbali, H. Jerbi, D. V. Thang, P. P. Kumar et al., "Test case generation from uml-diagrams using genetic algorithm," Computers, Materials & Continua, vol. 67, no.2, pp. 2321–2336, 2021.
This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.