ABSTRACT
Software testing has been commonly used in assuring the quality of database applications. It is often prohibitively expensive to manually write quality tests for complex database applications. Automated test generation techniques, such as Dynamic Symbolic Execution (DSE), have been proposed to reduce human efforts in testing database applications. However, such techniques have two major limitations: (1) they assume that the database that the application under test interacts with is accessible, which may not always be true; and (2) they usually cannot create necessary database states as a part of the generated tests.
To address the preceding limitations, we propose an approach that applies DSE to generate tests for a database application. Instead of using the actual database that the application interacts with, our approach produces and uses a mock database in test generation. A mock database mimics the behavior of an actual database by performing identical database operations on itself. We conducted two empirical evaluations on both a medical device and an open source software system to demonstrate that our approach can generate, without producing false warnings, tests with higher code coverage than conventional DSE-based techniques.
- }}H. Bati, L. Giakoumakis, S. Herbert, and A. Surna. A Genetic Approach for Random Testing of Database Systems. In Proc. VLDB, pages 1243--1251, 2007. Google ScholarDigital Library
- }}C. Binnig, D. Kossmann, and E. Lo. Reverse Query Processing. In Proc. ICDE, pages 506--515, 2007.Google ScholarCross Ref
- }}D. Chays, Y. Deng, P. G. Frankl, S. Dan, F. I. Vokolos, and E. J. Weyuker. An AGENDA for Testing Relational Database Applications. STVR, 14:17--44, 2004. Google ScholarDigital Library
- }}M. Emmi, R. Majumdar, and K. Sen. Dynamic Test Input Generation for Database Applications. In Proc. ISSTA, pages 151--162, 2007. Google ScholarDigital Library
- }}P. Godefroid, N. Klarlund, and K. Sen. DART: Directed Automated Random Testing. Proc. PLDI, pages 213--223, 2005. Google ScholarDigital Library
- }}T. Mackinnon, S. Freeman, and P. Craig. Endo-Testing: Unit Testing with Mock Objects. In Extreme Programming Examined, pages 287--301. Addison-Wesley Longman, 2001. Google ScholarDigital Library
- }}K. Sen, D. Marinov, and G. Agha. CUTE: A Concolic Unit Testing Engine for C. In Proc. FSE, pages 263--272, 2005. Google ScholarDigital Library
- }}http://msdn.microsoft.com/en-us/library/system.data.sqlclient.aspx.Google Scholar
- }}N. Tillmann and W. Schulte. Parameterized Unit Tests. In Proc. ESEC/FSE, pages 253--262, 2005. Google ScholarDigital Library
- }}N. Tillmann and W. Schulte. Mock-Object Generation with Behavior. In Proc. ASE, pages 365--368, 2006. Google ScholarDigital Library
- }}M. Veanes, P. Grigorenko, P. de Halleux, and N. Tillmann. Symbolic Query Exploration. In Proc. ICFEM, pages 49--68, 2009. Google ScholarDigital Library
- }}D. Willmor and S. M. Embury. An Intensional Approach to the Specification of Test Cases for Database Applications. In Proc. ICSE, pages 102--111, 2006. Google ScholarDigital Library
- }}C. Zaniolo and M. A. Meklanoff. On The Design of Relational Database Schemata. ACM Trans. Database Syst., 6:1--47, 1981. Google ScholarDigital Library
Index Terms
- MODA: automated test generation for database applications via mock objects
Recommendations
Towards a Method for Reducing the Test Suites of Database Applications
ICST '12: Proceedings of the 2012 IEEE Fifth International Conference on Software Testing, Verification and ValidationDatabase applications are commonly implemented and used in both industry and academia. These complex and rapidly evolving applications often have frequent changes in the source code of the program and the state and structure of the database. This paper ...
Database-aware test coverage monitoring
ISEC '08: Proceedings of the 1st India software engineering conferenceUnlike traditional programs, a database-centric application interacts with a database that has a complex state and structure. Even though the database is an important component of modern software, there are few tools to support the testing of database-...
Mutation Testing for Java Database Applications
ICST '09: Proceedings of the 2009 International Conference on Software Testing Verification and ValidationDatabase application programs are ubiquitous, so good techniques for testing them are needed. Recently, several research groups have proposed new approaches to generating tests for database applications and for assessing test data adequacy. This paper ...
Comments