Abstract
Automatic test pattern generation by applying genetic algorithms in reinforcement learning is proposed and the results of evaluation with an ATM system which assuming the existence of a bug related to a global variable are reported. For software development based on formal specifications, a number of methods for the automatic generation of test cases have previously been proposed. However, most of those methods are for testing whether or not the specifications are correctly implemented, and the problem of automatically generating test cases for which all of the paths can be traversed, including paths that were not anticipated, remains unsolved. We have previously demonstrated the feasibility of using genetic algorithms as an effective approach to that problem by evaluation with a simple test problem that assumes a single-variable input and evaluation assuming that the total number of paths is known. Here, we use a genetic algorithm in which the test cases are used as the gene locus values in the chromosome with redundant gene length and the difference vector is used for performing mutation. We compare this approach to the pairwise method and the vibration method, which are leading research areas, in a more realistic testing environment such as evaluation of ATM system programs. We show that the proposed method can provide higher program path coverage than the previous methods and effectively generates test cases for a bug related to a global variable.
Keywords
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Horcher, H.-M.: Improving software tests using Z specifications. In: Proceeding 9th International Conference of Z Users, The Z Formal specification Notation (1995)
Spivey, J.M.: The Z notation: A Reference Manual, 2nd edn. Prentice Hall (1992)
Offutt, J., Abdurazik, A.: Generating tests from UML specifications. In: France, R.B. (ed.) UML 1999. LNCS, vol. 1723, pp. 416–429. Springer, Heidelberg (1999)
Rumbaugh, J., Jacobson, I., Booch, G.: The Unified Modeling Language Reference Manual. Addison-Wesley Object Technology Series (1998)
Chang, J., Richardson, D.J.: Structural specification-based testing: automated support and experimental evaluation. In: Proceeding 7th ACM SIGSOFT Symposium on the Foundations of Software Engineering, pp. 285–302, September 1999
Sanker, S., Hayes, R.: Specifying and testing software components using ADL. Technical Report SMLI TR-94-23, Cun Microsystems Laboratories, Inc., Mountain View, CA, April 1994
Boyapati, C., Khurshid, S., Marinov, D.: Korat: automatically testing based on java predicates. ISSTA 2002 Proceedings of the ACM SIGSOFT International Symposium on Software testing and analysis, pp. 123–133 (2002)
Sánchez, M.A.: Specification-based Testing, pp. 12–47 (1997)
Marinov, D., Khurshid, S.: TestEra: a novel framework for automated testing of Java programs. In: Proceeding 16th IEEE International Conference on Automated Software Engineering, San Diego, November 2001
Jackson, D., Schechter, I., Shlyakhter, I.: ALCOA: the alloy constraint analyzer. In: Proceeding 22nd international Conference on Software Engineering(ICSE), Limerick, June 2000
Cheon, Y., Leavens, G.T.: A simple and practical approach to unit testing: the JML and JUnit way. Technical Report 01–12, Department of Computer Science, Iowa State University, November 2001
Liu, S., Nakajima, S.: A “Vibration" method for automatically generating test cases based on formal specifications. In: Software Engineering Conference, 2011 18th Asia Pacific, pp. 73–80, 5–8 December 2011
Liu, S., Nakajima, S.: A decompositional approach to automatic test cases generation based on formal specification. In 4th IEEE International Conference on Secure Software Integration and Reliability Improvement, pp. 147–155. IEEE CS Press, Singapore, 9–11 June 2010
Reeves, C.R.: Modern Heuristic Techniques for Combinatorial Problems. Blackwell Scientific, Oxford (1993)
Beasley, J.E.: A genetic algorithm for the set covering problem. Eur. J. Oper. Res. 94, 392–404 (1996)
Beasley, D., Bull, D.R., Martin, R.R.: An overview of genetic algorithms: Part I, fundamentals. Univ. Comput. 15(2), 58–59 (1993)
http://www.kailesoft.cn (cited 7 July 2014)
Pargas, R.P., Harrold, M.J., Peck, R.R.: Test-data generation using genetic algorithms. J. Softw. Testing Verification Reliab. 9(4), 263–282 (1999)
Zhou, Y., Sugihara, T., Sato, Y.: Applying GA with Tabu list for automatically generating test cases based on formal specification. In: Liu, S., Duan, Z. (eds.) SOFL+MSVL 2014. LNCS, vol. 8979, pp. 17–31. Springer, Heidelberg (2015)
Acknowledgements
We would like to show my deepest gratitude to Prof. Shaoying Liu of the Department of Computer and Information Sciences in Hosei University for their valuable comments and discussions on experimental results.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
Sato, Y., Sugihara, T. (2016). Automatic Generation of Specification-Based Test Cases by Applying Genetic Algorithms in Reinforcement Learning. In: Liu, S., Duan, Z. (eds) Structured Object-Oriented Formal Language and Method. SOFL+MSVL 2015. Lecture Notes in Computer Science(), vol 9559. Springer, Cham. https://doi.org/10.1007/978-3-319-31220-0_5
Download citation
DOI: https://doi.org/10.1007/978-3-319-31220-0_5
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-31219-4
Online ISBN: 978-3-319-31220-0
eBook Packages: Computer ScienceComputer Science (R0)