skip to main content
10.1145/1988842.1988846acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
research-article

Database state generation via dynamic symbolic execution for coverage criteria

Published:13 June 2011Publication History

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.

References

  1. Microsoft Research Foundation of Software Engineering Group, Pex: Dynamic Analysis and Test Generation for .NET. 2007.Google ScholarGoogle Scholar
  2. P. Ammann, A. J. Offutt, and H. Huang. Coverage criteria for logical expressions. In ISSRE, pages 99--107, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. C. Binnig, D. Kossmann, and E. Lo. Reverse query processing. In ICDE, 2007.Google ScholarGoogle ScholarCross RefCross Ref
  4. J. Chilenski and S. P. Miller. Applicability of modified condition/decision coverage to software testing. Software Engineering Journal, pages 193--200, 1994.Google ScholarGoogle ScholarCross RefCross Ref
  5. D. Chays and J. Shahid. Query-based test generation for database applications. In DBTest, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. de la Riva, M. J. S. Cabal, and J. Tuya. Constraint-based test database generation for sql queries. In AST, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Y. Deng and D. Chays. Testing database transactions with agenda. In ICSE, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. Godefroid, N. Klarlund, and K. Sen. DART: directed automated random testing. In PLDI, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. W. Kim. On optimizing an sql-like nested query. ACM Trans. Database Syst., 7(3):443--469, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Li and C. Csallner. Dynamic symbolic database application testing. In DBTest 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. Emmi, R. Majumdar, and K. Sen. Dynamic test input generation for database applications. In ISSTA, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. K. Pan, X. Wu, and T. Xie. Generating program inputs for database application testing. Technical Report, UNC Charlotte, 2011.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. R. Pandita, T. Xie, N. Tillmann, and J. de Halleux. Guided test generation for coverage criteria. In ICSM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. K. Sen, D. Marinov, and G. Agha. CUTE: a concolic unit testing engine for C. In ESEC/SIGSOFT FSE, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. K. Taneja, Y. Zhang, and T. Xie. MODA: Automated Test Generation for Database Applications via Mock Objects. In ASE 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. N. Tillmann and J. de Halleux. Pex-white box test generation for .net. In TAP, pages 134--153, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. X. Wu, C. Sanghvi, Y. Wang, and Y. Zheng. Privacy Aware Data Generation for Testing Database Applications. In IDEAS, pages 317--326, 2005 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Database state generation via dynamic symbolic execution for coverage criteria

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            DBTest '11: Proceedings of the Fourth International Workshop on Testing Database Systems
            June 2011
            51 pages
            ISBN:9781450306553
            DOI:10.1145/1988842

            Copyright © 2011 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 13 June 2011

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            Overall Acceptance Rate31of56submissions,55%

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader