Constraint-based test database generation for SQL queries

Populating test databases with meaningful test data is a difficult task as it involves generating data for many joined tables that must be diverse enough to be able to reveal faults and small enough to make the testing process efficient. This paper proposes an approach for the automatic generation of a test database for a set of SQL queries using a test criterion specifically tailored for the SQL language (SQLFpc). Given as input a schema database and a set of test requirements derived from the application of the test criterion to the target queries, the approach returns a database instance which satisfies the test requirements. Both the schema and the test requirements are modeled in the Alloy language, after which the analyzer generates the test database. The approach is evaluated on a real case study and the results show its feasibility, generating a test database of reduced size with an elevated coverage and mutation score.

[1]  Javier Tuya,et al.  Mutating database queries , 2007, Inf. Softw. Technol..

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

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

[4]  Daniel Jackson,et al.  Alloy: a lightweight object modelling notation , 2002, TSEM.

[5]  E. F. Codd,et al.  The Relational Model for Database Management, Version 2 , 1990 .

[6]  Rupak Majumdar,et al.  Dynamic test input generation for database applications , 2007, ISSTA '07.

[7]  Junta de Regulación,et al.  " " > , 2007 .

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

[9]  Javier Tuya,et al.  Structural Coverage Criteria for Testing SQL Queries , 2009, J. Univers. Comput. Sci..

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

[11]  M.J. Suarez-Cabal,et al.  SQLMutation: A tool to generate mutants of SQL database queries , 2006, Second Workshop on Mutation Analysis (Mutation 2006 - ISSRE Workshops 2006).

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

[13]  Carsten Binnig,et al.  Reverse Query Processing , 2007, 2007 IEEE 23rd International Conference on Data Engineering.

[14]  John Joseph Chilenski,et al.  An Investigation of Three Forms of the Modified Condition Decision Coverage (MCDC) Criterion , 2001 .

[15]  Wei-Tek Tsai,et al.  Automated Test Case Generation for Programs Specified by Relational Algebra Queries , 1990, IEEE Trans. Software Eng..

[16]  Shing-Chi Cheung,et al.  Automatic generation of database instances for white-box testing , 2001, 25th Annual International Computer Software and Applications Conference. COMPSAC 2001.

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

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

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

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

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

[22]  Javier Tuya,et al.  Full predicate coverage for testing SQL database queries , 2010, Softw. Test. Verification Reliab..