Advertisement

Grammar-Based White-Box Testing via Automated Constraint Path Generation

  • Bijoy Rahman Arif
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 755)

Abstract

Software testing is an indispensable procedure for assuring software quality and test case generation is one of the major stages of software testing odyssey. In this paper, the author presents a grammar-basedwhite-box testing which integrates some source code analysis, grammar-based test generation, and constraint solving as a whole. A preliminary implementation of grammar-based white-box testing, Java White-box Unit Tester (JWBUT), has been developed. JWBUT can generate well-distributed authentic test cases using the grammar-based white-box testing scheme, which starts from static analysis of Java source code, transforms control flow into context-free grammar (CFG), applies to grammar-based test generator to produce a set of constraint paths, and finally, generates test cases by solving the constraint paths. The author has experimented JWBUT on a set of Java methods to demonstrate the effectiveness of grammar-based white-box testing.

Notes

Acknowledgements

I am really thankful and grateful to Dr. Hai-Feng Guo (University of Nebraska—Omaha), Dr. Qiuming Zhu (University of Nebraska—Omaha), and Dr. Yaoqing Yang (University of Nebraska—Lincoln) for their kind help.

References

  1. 1.
    Hetzel, C.W.: The Complete Guide to Software Testing. QED Information Sciences, vol. 2. Wellesley, MA (1988)Google Scholar
  2. 2.
    Ould, M.: Testing—a challenge to method and tool developers. Softw. Eng. J. 6(2) (1991)Google Scholar
  3. 3.
    Anand, S., Harrold, M.J.: An orchestrated survey on automated software test case generation: test data generation by symbolic execution. J. Syst. Softw. (2013)Google Scholar
  4. 4.
    Patton, R.: Software Testing, vol. 2. ACM (2005)Google Scholar
  5. 5.
    Pan, J., Koopman, P., and Siewiorek, D.: A dimensionality model approach to testing and improving software robustness. In: Proceedings of AUTOTESTCON (1999)Google Scholar
  6. 6.
    Parrington, N., Roper, M.: Understanding Software Testing. Willey (1989)Google Scholar
  7. 7.
    de Moura, L.M., Bjørner, N.: Z3: an efficient SMT solver. In: Proceedings of the 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’08), pp. 337–340 (2008)Google Scholar
  8. 8.
    Dutertre, B., de Moura, L.M.: A fast linear-arithmetic solver for DPLL(T). In: Proceedings of the 18th International Conference on Computer Aided Verification (CAV’06), pp. 81–94 (2006)Google Scholar
  9. 9.
    Ganesh, V., Dill, D.L.: A decision procedure for bit-vectors and arrays. In: Proceedings of the 19th International Conference on Computer Aided Verification (CAV’07), pp. 519–531 (2007)Google Scholar
  10. 10.
    Anand, S., Godefroid, P., Tillmann, N.: Demand-driven compositional symbolic execution. In: Proceedings of the 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pp. 367–381. Springer (2008)Google Scholar
  11. 11.
    Godefroid, P.: Compositional dynamic test generation. In: Proceedings of the 34th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’07), pp. 47–54 (2007)Google Scholar
  12. 12.
    Bjørner, N., Tillmann, N., Voronkov, A.: Path feasibility analysis for string-manipulating programs. In: Proceedings of the International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pp. 307–321 (2009)Google Scholar
  13. 13.
    Veanes, M., Bjørner, N.: Alternating simulation and IOCO. In: Petrenko, A., da Silva Simão, A., Maldonado, J.C. (eds.), Proceedings of the 22nd IFIP WG 6.1 International Conference on Testing Software and Systems (ICTSS’10), pp. 47–62. Springer (2010)Google Scholar
  14. 14.
    Godefroid, P., Kiezun, A., Levin, M.Y.: Grammar-Based whitebox fuzzing. In: Proceedings of the ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation (PLDI’08), pp. 206–215 (2008)Google Scholar
  15. 15.
    Majumdar, R., Xu, R.G.: Reducing test inputs using information partitions. In: Proceedings of the 21st International Conference on Computer Aided Verification (CAV’09), pp. 555–569 (2009)Google Scholar
  16. 16.
    Anand, S., Pasareanu, C.S., Visser, W.: Symbolic execution with abstraction. Int. J. Softw. Tools Technol. Transf. 11, 53–67 (2009)CrossRefGoogle Scholar
  17. 17.
    Chipounov, V., Kuznetsov, V., Candea, G.: S2e: a platform for in-vivo multi-path analysis of software systems. In: Proceedings of the 16th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS’11), pp. 265–278 (2011)Google Scholar
  18. 18.
    Sirer, E.G., Bershad, B.N.: Using poduction Grammars in software testing. In: Proceedings of the 2nd Conference on Domain-Specific Languages, pp. 1–13. ACM (1999)Google Scholar
  19. 19.
    Hoffman, D.M., Ly-Gagnon, D., Strooper, P., Wang, H.Y.: Grammar-based test generation with YouGen. Softw. Pract. Exp. 41(4), 427–447 (2011)CrossRefGoogle Scholar
  20. 20.
    King, J.C.: A new approach to program testing. Programm. Methodol. LNCS 23, 278–290 (1975)CrossRefGoogle Scholar
  21. 21.
    Guo, H., Qiu, Z.: A dynamic stochastic model for automatic grammar based test generation. Softw. Pract. Exp. (2014)Google Scholar
  22. 22.
  23. 23.
    Hopcroft, J.R., Motwani. R., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation. Addison Wesley (2001)Google Scholar
  24. 24.
    Sen, K., Marinov, D., Agha, G.: Cute: a concolic unit testing engine for C. In: Proceedings of FSE (2005)Google Scholar
  25. 25.
    Godefroid, P., Klarlund, N., Sen, K.: DART: directed automated random testing. ACM Sigplan Notices, vol. 40(6). ACM (2005)Google Scholar
  26. 26.
    Majumdar, R., Xu, R.: Directed test generation using symbolic Grammar. In: Proceedings of ASE. ACM (2007)Google Scholar
  27. 27.
    Csallaner, C., Samaragdakis, Y.: JCrasher: an automatic robustness tester for Java. Softw. Pract. Exp. (2004)Google Scholar
  28. 28.
    Fraser, G., Arcuri, A.: Whole test suite generation. IEEE Trans. Softw. Eng. 39(2) (2013)Google Scholar
  29. 29.
    Zhang, S., Saff, D., Bu, Y., Ernst, M.D.: Combined static and dynamic automated test generation. In: Proceedings of ISSTA. ACM (2011)Google Scholar
  30. 30.
    Kugler, H., Harel, D., Pnueli, A., Lu, Y., Bontemps, Y.: A dimentionality model approach to testing and improving software robustness. In: Proceedings of AUTOTESTCON (1999)Google Scholar
  31. 31.
    AT&T Research: Graphviz. http://www.graphviz.org

Copyright information

© Springer Nature Singapore Pte Ltd. 2019

Authors and Affiliations

  1. 1.Independent UniversityDhakaBangladesh

Personalised recommendations