Abstract
Part of the automating software testing procedure includes the automation of test cases. Automation can lower the cost and effort and at the same time can increase the quality of test cases and consequently the testing procedure. Many different approaches for test case generation are available: generation from code, formal methods and different models, among others also from UML diagrams, more precisely from UML activity diagrams. Researchers use different techniques, of which genetic programming (GP) is very popular and was used in our research. In the proposed approach we generated test cases from the UML activity diagram, from which we constructed the binary decision tree structure, which is used as an instance in the evolution process of GP. The default tree structure is used throughout the whole evolution process, only the content (the testing parameters) of the nodes changes. The process of evolution consists of several genetic operators, such as selection, crossover and mutation. The main novelty of our method is a different fitness function than we can find in existing literature. In contrast to related work where the coverage is used - we used the error occurrence for our metric. The proposed method is demonstrated on the example of an automated teller machine (ATM), where we show how the full automation of test case generation and testing is a major advantage of our method.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsReferences
Samuel, P., Mall, R., Bothra, A.K.: Automatic test case generation using unified modeling language (UML) state diagrams. IET Softw. 2(2), 79–93 (2008)
Swain, R., Panthi, V., Behera, P.K., Mohapatra, D.P.: Automatic test case generation from UML state chart diagram. Int. J. Comput. Appl. 42(7), 26–36 (2012)
Gulia, P., Chillar, R.S.: A new approach to generate and optimize test cases for UML state diagram using genetic algorithm. SIGSOFT Softw. Eng. Notes 37(3), 1–5 (2012)
Shamsoddin-Motlagh, E.: A review of automatic test cases generation. Int. J. Comput. Appl. 57(13), 25–29 (2012)
IEEE: IEEE Standard for Software and System Test Documentation (2008)
Li, L., He, T., Tang, S.: Consistency checking and test generation for UML statechart diagram via extended context-free grammar (2012)
Schlick, R., Herzner, W., Jöbstl, E.: Fault-based generation of test cases from UML-models – approach and some experiences. In: Flammini, F., Bologna, S., Vittorini, V. (eds.) SAFECOMP 2011. LNCS, vol. 6894, pp. 270–283. Springer, Heidelberg (2011)
Hametner, R., Kormann, B., Vogel-Heuser, B., Winkler, D., Zoitl, A.: Test case generation approach for industrial automation systems (2011)
Swain, S., Mohapatra, D., Mall, R.: Test case generation based on use case and sequence diagram. IJSE 3, 1–32 (2010)
OMG: Unified Modeling Language Version 2.4.1 (2011)
Samuel, P., Joseph, A.T.: Test Sequence Generation from UML Sequence Diagrams (2008)
Gantait, A.: Test Case Generation and Prioritization from UML Models (2011)
Kundu, D., Samanta, D.: A novel approach to generate test cases from UML activity diagrams. J. Object Technol. 8(3), 65–83 (2009)
Sharma, C., Sabharwal, S., Sibal, R.: A survey on software testing techniques using genetic algorithm. IJCSI 10(1), 381–393 (2013)
Shirole, M., Kumar, R.: UML behavioral model based test case generation: a survey. SIGSOFT Softw. Eng. Notes 38(4), 1–13 (2013)
Doungsa-ard, C., Dahal, K., Hossain, A., Suwannasart, T.: Test Data Generation from UML State Machine Diagrams using GAs (2007)
Lefticaru, R., Ipate, F.: Automatic State-Based Test Generation Using Genetic Algorithms (2007)
Lefticaru, R., Ipate, F.: Functional Search-Based Testing from State Machines (2008)
Shirole, M., Suthar, A., Kumar, R.: Generation of improved test cases from UML state diagram using genetic algorithm. In: Proceedings of the 4th India Software Engineering Conference, ISEC 2011, pp. 125–134. ACM, New York (2011)
Shirole, M., Kommuri, M., Kumar, R.: Transition sequence exploration of UML activity diagram using evolutionary algorithm. In: Proceedings of the 5th India Software Engineering Conference, ISEC 2012, pp. 97–100. ACM, New York (2012)
Koza, J.R.: Survey of genetic algorithms and genetic programming. In: Wescon Conference Record, Western Periodicals Company, pp. 589–594 (1995)
D’haeseleer, P.: Context preserving crossover in genetic programming. In: International Conference on Evolutionary Computation, pp. 256–261 (1994)
Acknowledgements
This work was partly supported by the Slovenian Research Agency (SRA) under The Young Researchers Programme (SICRIS/SRA code 35512, RO 0796, Programme P2-0057).
Author information
Authors and Affiliations
Corresponding authors
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Karakatič, S., Schweighofer, T. (2015). A Novel Approach to Generating Test Cases with Genetic Programming. In: Uden, L., Heričko, M., Ting, IH. (eds) Knowledge Management in Organizations. KMO 2015. Lecture Notes in Business Information Processing, vol 224. Springer, Cham. https://doi.org/10.1007/978-3-319-21009-4_20
Download citation
DOI: https://doi.org/10.1007/978-3-319-21009-4_20
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-21008-7
Online ISBN: 978-3-319-21009-4
eBook Packages: Computer ScienceComputer Science (R0)