Abstract
In this paper, we present an automatic grammar-based test generation approach which takes a symbolic grammar as input, requires zero control input from users, and produces well-distributed test cases. Our approach utilizes a novel dynamic stochastic model where each variable is associated with a tuple of probability distributions, which are dynamically adjusted along the derivation. The adjustment is based on a tabling strategy to keep track of the recursion of each grammar variable. We further present a test generation coverage tree illustrating the distribution of generated test cases and their detailed derivations, more importantly, it provides various implicit balance control mechanisms. We implemented this approach in a Java-based system, named Gena. Experimental results demonstrate the effectiveness of our test generation approach and show the balanced distribution of generated test cases over grammatical structures.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Bagheri, E., Ensan, F., Gasevic, D.: Grammar-based test generation for software product line feature models. In: Proceedings of the 2012 Conference of the Centre for Advanced Studies on Collaborative Research (CASCON 2012). IBM (2012)
Belli, F., Endo, A.T., Linschulte, M., da Silva Simo, A.: Model-based testing of web service compositions. In: IEEE 6th International Symposium on Service Oriented System Engineering, pp. 181–192 (2011)
Godefroid, P., Kiezun, A., Levin, M.Y.: Grammar-based whitebox fuzzing. ACM Sigplan Notices 43(6), 206–215 (2008)
Guo, H.F., Gupta, G.: Simplifying dynamic programming via mode-directed tabling. Software Practice & Experience 38(1), 75–94 (2008)
Hanford, K.: Automatic generation of test cases. IBM Systems Journal 9(4), 242–257 (1970)
Harrold, M.J., Koltit, P.C.: A compiler-based data flow testing system. In: Pacific Northwest Quality Assurance, pp. 311–323 (1992)
Hoffman, D.M., Ly-Gagnon, D., Strooper, P., Wang, H.Y.: Grammar-based test generation with yougen. Software Practice and Experience 41(4), 427–447 (2011)
Jacod, J., Protter, P.: Probability Essentials, p. 37. Springer (2003)
Kosindrdecha, N., Daengdej, J.: A test case generation process and technique. Journal of Software Engineering 4(4), 265–287 (2010)
Lämmel, R.: Grammar testing. In: Hussmann, H. (ed.) FASE 2001. LNCS, vol. 2029, pp. 201–216. Springer, Heidelberg (2001)
Lämmel, R., Schulte, W.: Controllable combinatorial coverage in grammar-based testing. In: Uyar, M.Ü., Duale, A.Y., Fecko, M.A. (eds.) TestCom 2006. LNCS, vol. 3964, pp. 19–38. Springer, Heidelberg (2006)
Majumdar, R., Xu, R.G.: Directed test generation using symbolic grammars. In: Proceedings of the 22nd IEEE/ACM International Conference on Automated Software Engineering, pp. 134–143. ACM (2007)
Maurer, P.M.: Generating test data with enhanced context-free grammars. IEEE Software 7(4), 50–55 (1990)
Maurer, P.M.: The design and implementation of a grammar-based data generator. Softw. Practice and Experience 22(3), 223–244 (1992)
McKeeman, W.: Differential testing for software. Digital Technical Journal of Digital Equipment Corporation 10(1), 100–107 (1998)
Offutt, J., Liu, S., Abdurazik, A., Ammann, P.: Generating test data from state based specifications. The Journal of Software Testing, Verification and Reliability 13, 25–53 (2003)
Pretschner, A., Prenninger, W., Wagner, S., Kühnel, C., Baumgartner, M., Sostawa, B., Zölch, R., Stauner, T.: One evaluation of model-based testing and its automation. In: Proceedings of the 27th International Conference on Software Engineering, pp. 392–401. ACM (2005)
Raymond, P., Nicollin, X., Halbwachs, N., Weber, D.: Automatic testing of reactive systems. In: 32nd IEEE Real-Time Systems Symposium, pp. 200–209. IEEE Computer Society (1998)
Sirer, E.G., Bershad, B.N.: Using production grammars in software testing. In: Proceedings of the 2nd Conference on Domain-Specific Languages, pp. 1–13. ACM (1999)
Tai, K.C., Lei, Y.: A test generation strategy for pairwise testing. IEEE Transactions on Software Engineering 28(1), 109–111 (2002)
Warren, D.S.: Memoing for logic programs. Communications of the ACM 35(3), 93–111 (1992)
Yoo, S., Harman, M.: Regression testing minimization, selection and prioritization: a survey. Software Testing, Verification and Reliability 22(2), 67–120 (2012)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 IFIP International Federation for Information Processing
About this paper
Cite this paper
Guo, HF., Qiu, Z. (2013). Automatic Grammar-Based Test Generation. In: Yenigün, H., Yilmaz, C., Ulrich, A. (eds) Testing Software and Systems. ICTSS 2013. Lecture Notes in Computer Science, vol 8254. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-41707-8_2
Download citation
DOI: https://doi.org/10.1007/978-3-642-41707-8_2
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-41706-1
Online ISBN: 978-3-642-41707-8
eBook Packages: Computer ScienceComputer Science (R0)