Constraint-based generation of database states for testing database applications

Testing is essential for quality assurance of database applications. To test the quality of database applications, it usually requires test inputs consisting of both program input values and corresponding database states. However, producing these tests could be very tedious and labor-intensive in a non-automated way. It is thus imperative to conduct automatic test generation helping reduce human efforts. The research focuses on automatic test generation of both program input values and corresponding database states for testing database applications. We develop our approaches based on the Dynamic Symbolic Execution (DSE) technique to achieve various testing requirements. We formalize a problem for program-input-generation given an existing database state to achieve high program code coverage and propose an approach that conducts program-input-generation through auxiliary query construction based on the intermediate information accumulated during DSE's exploration. We develop a technique to generate database states to achieve advanced code coverage criteria such as Boundary Value Coverage and Logical Coverage. We develop an approach that constructs synthesized database interactions to guide the DSE's exploration to collect constraints for both program inputs and associated database states. In this way, we bridge various constraints within a database application: query-construction constraints, query constraints, database schema constraints, and query-result-manipulation constraints. We develop an approach that generates tests for mutation testing on database applications. We use a state-of-the-art white-box testing tool called Pex for .NET from Microsoft Research as the DSE engine. Empirical evaluation results show that our approaches are able to generate effective program input values and sufficient database states to achieve various testing requirements.

[1]  Nikolai Tillmann,et al.  Test generation via Dynamic Symbolic Execution for mutation testing , 2010, 2010 IEEE International Conference on Software Maintenance.

[2]  Suzanne M. Embury,et al.  An intensional approach to the specification of test cases for database applications , 2006, ICSE '06.

[3]  Sarfraz Khurshid,et al.  Query-Aware Test Generation Using a Relational Constraint Solver , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[4]  Lori A. Clarke,et al.  A System to Generate Test Data and Symbolically Execute Programs , 1976, IEEE Transactions on Software Engineering.

[5]  Hong Su,et al.  Cost-based query transformation in Oracle , 2006, VLDB.

[6]  James C. King,et al.  Symbolic execution and program testing , 1976, CACM.

[7]  Chen Fu,et al.  Is Data Privacy Always Good for Software Testing? , 2010, 2010 IEEE 21st International Symposium on Software Reliability Engineering.

[8]  Patrice Godefroid,et al.  Automatic partial loop summarization in dynamic test generation , 2011, ISSTA '11.

[9]  Phyllis G. Frankl,et al.  Mutation Testing for Java Database Applications , 2009, 2009 International Conference on Software Testing Verification and Validation.

[10]  Chengkai Li,et al.  Dynamic symbolic database application testing , 2010, DBTest '10.

[11]  Koushik Sen,et al.  DART: directed automated random testing , 2005, PLDI '05.

[12]  Nikolai Tillmann,et al.  Guided test generation for coverage criteria , 2010, 2010 IEEE International Conference on Software Maintenance.

[13]  Donald Kossmann,et al.  Parallel Execution of Test Runs for Database Application Systems , 2005, VLDB.

[14]  Zhendong Su,et al.  Static Checking of Dynamically Generated Queries in Database Applications , 2004, ICSE 2004.

[15]  Tao Xie,et al.  Automatic test generation for mutation testing on database applications , 2013, 2013 8th International Workshop on Automation of Software Test (AST).

[16]  Bruno Legeard,et al.  Boundary coverage criteria for test generation from formal models , 2004, 15th International Symposium on Software Reliability Engineering.

[17]  Yongge Wang,et al.  Privacy preserving database application testing , 2003, WPES '03.

[18]  Yongge Wang,et al.  Statistical Database Modeling for Privacy Preserving Database Generation , 2005, ISMIS.

[19]  Won Kim,et al.  On optimizing an SQL-like nested query , 1982, TODS.

[20]  Phyllis G. Frankl,et al.  Inferential Checking for Mutants Modifying Database States , 2011, 2011 Fourth IEEE International Conference on Software Testing, Verification and Validation.

[21]  Javier Tuya,et al.  Constraint-based test database generation for SQL queries , 2010, AST '10.

[22]  Nikolai Tillmann,et al.  Mock-object generation with behavior , 2006, 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06).

[23]  Yongge Wang,et al.  Privacy aware data generation for testing database applications , 2005, 9th International Database Engineering & Application Symposium (IDEAS'05).

[24]  Koushik Sen,et al.  CUTE: a concolic unit testing engine for C , 2005, ESEC/FSE-13.

[25]  Mary Lou Soffa,et al.  A family of test adequacy criteria for database-driven applications , 2003, ESEC/FSE-11.

[26]  Surajit Chaudhuri,et al.  Flexible Database Generators , 2005, VLDB.

[27]  Carsten Binnig,et al.  Multi-RQP: generating test databases for the functional testing of OLTP applications , 2008, DBTest '08.

[28]  A. Jefferson Offutt,et al.  Constraint-Based Automatic Test Data Generation , 1991, IEEE Trans. Software Eng..

[29]  Elaine J. Weyuker,et al.  An AGENDA for testing relational database applications , 2004, Softw. Test. Verification Reliab..

[30]  Margus Veanes,et al.  Symbolic Query Exploration , 2009, ICFEM.

[31]  Gregory M. Kapfhammer,et al.  Localizing SQL faults in database applications , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[32]  Tao Xie,et al.  Generating program inputs for database application testing , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[33]  Nikolai Tillmann,et al.  Pex-White Box Test Generation for .NET , 2008, TAP.

[34]  Gregg Rothermel,et al.  An experimental evaluation of selective mutation , 1993, Proceedings of 1993 15th International Conference on Software Engineering.

[35]  Tao Xie,et al.  Guided test generation for database applications via synthesized database interactions , 2014, ACM Trans. Softw. Eng. Methodol..

[36]  Alessandro Orso,et al.  Command-Form Coverage for Testing Database Applications , 2006, 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06).

[37]  Carsten Binnig,et al.  Testing database applications , 2006, SIGMOD Conference.

[38]  Yuetang Deng,et al.  Demonstration of AGENDA tool set for testing relational database applications , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[39]  Nikolai Tillmann,et al.  Environment Modeling for Automated Testing of Cloud Applications , 2011, CloudCom 2011.

[40]  Yi Zhang,et al.  MODA: automated test generation for database applications via mock objects , 2010, ASE '10.

[41]  A. Jefferson Offutt,et al.  Coverage criteria for logical expressions , 2003, 14th International Symposium on Software Reliability Engineering, 2003. ISSRE 2003..

[42]  Matthew B. Dwyer,et al.  Automatic generation of load tests , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[43]  Phyllis G. Frankl,et al.  Query-based test generation for database applications , 2008, DBTest '08.

[44]  William E. Howden,et al.  Weak Mutation Testing and Completeness of Test Sets , 1982, IEEE Transactions on Software Engineering.

[45]  Yongge Wang,et al.  Privacy Preserving Database Generation for Database Application Testing , 2007, Fundam. Informaticae.

[46]  Yuetang Deng,et al.  Testing database transactions with AGENDA , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[47]  Leo Giakoumakis,et al.  A genetic approach for random testing of database systems , 2007, VLDB.

[48]  Craig W. Thompson,et al.  A parallel general-purpose synthetic data generator , 2007, SGMD.

[49]  Javier Tuya,et al.  Improvement of test data by measuring SQL statement coverage , 2003, Eleventh Annual International Workshop on Software Technology and Engineering Practice.

[50]  Nikolai Tillmann,et al.  Fitness-guided path exploration in dynamic symbolic execution , 2009, 2009 IEEE/IFIP International Conference on Dependable Systems & Networks.

[51]  Suzanne M. Embury,et al.  A safe regression test selection technique for database-driven applications , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[52]  Ernest Teniente,et al.  SVTe: a tool to validate database schemas giving explanations , 2008, DBTest '08.

[53]  Tao Xie,et al.  Database state generation via dynamic symbolic execution for coverage criteria , 2011, DBTest '11.

[54]  Rayid Ghani,et al.  Testing software in age of data privacy: a balancing act , 2011, ESEC/FSE '11.

[55]  Richard J. Lipton,et al.  Hints on Test Data Selection: Help for the Practicing Programmer , 1978, Computer.