ABSTRACT
A database application differs form regular applications in that some of its inputs may be database queries. The program will execute the queries on a database and may use any result values in its subsequent program logic. This means that a user-supplied query may determine the values that the application will use in subsequent branching conditions. At the same time, a new database application is often required to work well on a body of existing data stored in some large database. For systematic testing of database applications, recent techniques replace the existing database with carefully crafted mock databases. Mock databases return values that will trigger as many execution paths in the application as possible and thereby maximize overall code coverage of the database application.
In this paper we offer an alternative approach to database application testing. Our goal is to support software engineers in focusing testing on the existing body of data the application is required to work well on. For that, we propose to side-step mock database generation and instead generate queries for the existing database. Our key insight is that we can use the information collected during previous program executions to systematically generate new queries that will maximize the coverage of the application under test, while guaranteeing that the generated test cases focus on the existing data.
- M. K. Bergman. The deep web: Surfacing hidden value. Journal of Electronic Publishing, 7(1), Aug. 2001.Google ScholarCross Ref
- C. Binnig, D. Kossmann, and E. Lo. Reverse query processing. In ICDE, pages 506--515. IEEE, Apr. 2007.Google ScholarCross Ref
- É. Bruneton, R. Lenglet, and T. Coupaye. ASM: a code manipulation tool to implement adaptable systems. In Proc. ACM SIGOPS France Journées Composants 2002: Systèmes à composants adaptables et extensibles (Adaptable and extensible component systems), Nov. 2002.Google Scholar
- K. C.-C. Chang, B. He, C. Li, M. Patel, and Z. Zhang. Structured databases on the web: observations and implications. SIGMOD Rec., 33(3):61--70, 2004. Google ScholarDigital Library
- D. Chays, J. Shahid, and P. G. Frankl. Query-based test generation for database applications. In DBTest, pages 1--6. ACM, 2008. Google ScholarDigital Library
- G. A. Cohen, J. S. Chase, and D. L. Kaminsky. Automatic program transformation with Joie. In Proc. USENIX Annual Technical Symposium, pages 167--178, June 1998. Google ScholarDigital Library
- M. Emmi, R. Majumdar, and K. Sen. Dynamic test input generation for database applications. In Proc. ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA), pages 151--162. ACM, July 2007. Google ScholarDigital Library
- P. Godefroid, N. Klarlund, and K. Sen. Dart: Directed automated random testing. In PLDI, pages 213--223, 2005. Google ScholarDigital Library
- K. Haller. White-box testing for database-driven applications: a requirements analysis. In DBTest, pages 1--6. ACM, June 2009. Google ScholarDigital Library
- G. M. Kapfhammer. A comprehensive framework for testing database-centric software applications. PhD thesis, University of Pittsburgh, 2007.Google Scholar
- J. Madhavan, D. Ko, L. Kot, V. Ganapathy, A. Rasmussen, and A. Halevy. Google's deep web crawl. Proc. VLDB Endow., 1(2):1241--1252, 2008. Google ScholarDigital Library
- L. d. Moura and N. Bjørner. Z3: An efficient SMT solver. In Proc. 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS), pages 337--340. Springer, Apr. 2008. Google ScholarDigital Library
- F. Olken. Random Sampling from Databases. PhD thesis, University of California, Berkeley, 1993.Google Scholar
- S. Raghavan and H. Garcia-Molina. Crawling the hidden web. In VLDB '01, pages 129--138, 2001. Google ScholarDigital Library
- K. Sen and G. Agha. Cute and jCute: Concolic unit testing and explicit path model-checking tools. In CAV, 2006. Google ScholarDigital Library
- N. Tillmann and J. de Halleux. Pex - white box test generation for .Net. In Proc. 2nd International Conference on Tests And Proofs (TAP), pages 134--153. Springer, 2008. Google ScholarDigital Library
- M. Veanes, P. Grigorenko, P. de Halleux, and N. Tillmann. Symbolic query exploration. In ICFEM, pages 49--68, 2009. Google ScholarDigital Library
- J. S. Vitter. Random sampling with a reservoir. ACM Trans. Math. Softw., 11(1):37--57, 1985. Google ScholarDigital Library
Index Terms
- Dynamic symbolic database application testing
Recommendations
Dsc+Mock: a test case + mock class generator in support of coding against interfaces
WODA '10: Proceedings of the Eighth International Workshop on Dynamic AnalysisCoding against interfaces is a powerful technique in object-oriented programming. It decouples code and enables independent development. However, code decoupled via interfaces poses additional challenges for testing and dynamic execution, as not all ...
Database state generation via dynamic symbolic execution for coverage criteria
DBTest '11: Proceedings of the Fourth International Workshop on Testing Database SystemsAutomatically generating sufficient database states is imperative to reduce human efforts in testing database applications. Complementing the traditional block or branch coverage, we develop an approach that generates database states to achieve advanced ...
Guided test generation for database applications via synthesized database interactions
Testing database applications typically requires the generation of tests consisting of both program inputs and database states. Recently, a testing technique called Dynamic Symbolic Execution (DSE) has been proposed to reduce manual effort in test ...
Comments