ABSTRACT
Automatically 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 code coverage including boundary value coverage(BVC) and logical coverage(LC) for source code under test. In our approach, we leverage dynamic symbolic execution to examine close relationships among host variables, embedded SQL query statements, and branch conditions in source code. We then derive constraints such that data satisfying those constraints can achieve the target coverage criteria. We implement our approach upon Pex, which is a state-of-the-art DSE-based test-generation tool for .NET. Empirical evaluations on two real database applications show that our approach assists Pex to generate test database states that can effectively achieve both BVC and LC, complementing the block or branch coverage.
- Microsoft Research Foundation of Software Engineering Group, Pex: Dynamic Analysis and Test Generation for .NET. 2007.Google Scholar
- P. Ammann, A. J. Offutt, and H. Huang. Coverage criteria for logical expressions. In ISSRE, pages 99--107, 2003. Google ScholarDigital Library
- C. Binnig, D. Kossmann, and E. Lo. Reverse query processing. In ICDE, 2007.Google ScholarCross Ref
- J. Chilenski and S. P. Miller. Applicability of modified condition/decision coverage to software testing. Software Engineering Journal, pages 193--200, 1994.Google ScholarCross Ref
- D. Chays and J. Shahid. Query-based test generation for database applications. In DBTest, 2008. Google ScholarDigital Library
- C. de la Riva, M. J. S. Cabal, and J. Tuya. Constraint-based test database generation for sql queries. In AST, 2010. Google ScholarDigital Library
- Y. Deng and D. Chays. Testing database transactions with agenda. In ICSE, 2005. Google ScholarDigital Library
- P. Godefroid, N. Klarlund, and K. Sen. DART: directed automated random testing. In PLDI, 2005. Google ScholarDigital Library
- W. Kim. On optimizing an sql-like nested query. ACM Trans. Database Syst., 7(3):443--469, 1982. Google ScholarDigital Library
- N. Kosmatov, B. Legeard, F. Peureux, and M. Utting. Boundary coverage criteria for test generation from formal models. In ISSRE, pages 139--150, 2004. Google ScholarDigital Library
- C. Li and C. Csallner. Dynamic symbolic database application testing. In DBTest 2010. Google ScholarDigital Library
- M. Emmi, R. Majumdar, and K. Sen. Dynamic test input generation for database applications. In ISSTA, 2007. Google ScholarDigital Library
- K. Pan, X. Wu, and T. Xie. Generating program inputs for database application testing. Technical Report, UNC Charlotte, 2011.Google ScholarDigital Library
- R. Pandita, T. Xie, N. Tillmann, and J. de Halleux. Guided test generation for coverage criteria. In ICSM, 2010. Google ScholarDigital Library
- K. Sen, D. Marinov, and G. Agha. CUTE: a concolic unit testing engine for C. In ESEC/SIGSOFT FSE, 2005. Google ScholarDigital Library
- K. Taneja, Y. Zhang, and T. Xie. MODA: Automated Test Generation for Database Applications via Mock Objects. In ASE 2010. Google ScholarDigital Library
- N. Tillmann and J. de Halleux. Pex-white box test generation for .net. In TAP, pages 134--153, 2008. Google ScholarDigital Library
- J. Tuya, M. J. S. Cabal, and C. de la Riva. Full predicate coverage for testing sql database queries. volume 20, pages 237--288, 2010. Google ScholarDigital Library
- X. Wu, C. Sanghvi, Y. Wang, and Y. Zheng. Privacy Aware Data Generation for Testing Database Applications. In IDEAS, pages 317--326, 2005 Google ScholarDigital Library
Index Terms
- Database state generation via dynamic symbolic execution for coverage criteria
Recommendations
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 ...
The Effectiveness of Test Coverage Criteria for Relational Database Schema Integrity Constraints
Despite industry advice to the contrary, there has been little work that has sought to test that a relational database's schema has correctly specified integrity constraints. These critically important constraints ensure the coherence of data in a ...
Comparing non-adequate test suites using coverage criteria
ISSTA 2013: Proceedings of the 2013 International Symposium on Software Testing and AnalysisA fundamental question in software testing research is how to compare test suites, often as a means for comparing test-generation techniques. Researchers frequently compare test suites by measuring their coverage. A coverage criterion C provides a set ...
Comments