Search-Based Testing of Relational Schema Integrity Constraints Across Multiple Database Management Systems

There has been much attention to testing applications that interact with database management systems, and the testing of individual database management systems themselves. However, there has been very little work devoted to testing arguably the most important artefact involving an application supported by a relational database - the underlying schema. This paper introduces a search-based technique for generating database table data with the intention of exercising the integrity constraints placed on table columns. The development of a schema is a process open to flaws like any stage of application development. Its cornerstone nature to an application means that defects need to be found early in order to prevent knock-on effects to other parts of a project and the spiralling bug-fixing costs that may be incurred. Examples of such flaws include incomplete primary keys, incorrect foreign keys, and omissions of NOT NULL declarations. Using mutation analysis, this paper presents an empirical study evaluating the effectiveness of our proposed technique and comparing it against a popular tool for generating table data, DBMonster. With competitive or faster data generation times, our method outperforms DBMonster in terms of both constraint coverage and mutation score.

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

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

[3]  Phil McMinn,et al.  Search‐based software test data generation: a survey , 2004, Softw. Test. Verification Reliab..

[4]  Andrea Arcuri,et al.  It Does Matter How You Normalise the Branch Distance in Search Based Software Testing , 2010, 2010 Third International Conference on Software Testing, Verification and Validation.

[5]  Frederick Mosteller,et al.  Understanding Robust and Exploratory Data Analysis. , 1983 .

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

[7]  Leonardo Bottaci Type Sensitive Application of Mutation Operators for Dynamically Typed Programs , 2010, 2010 Third International Conference on Software Testing, Verification, and Validation Workshops.

[8]  Bogdan Korel,et al.  Automated Software Test Data Generation , 1990, IEEE Trans. Software Eng..

[9]  Shing-Chi Cheung,et al.  Fault-based testing of database application programs with conceptual data model , 2005, Fifth International Conference on Quality Software (QSIC'05).

[10]  Sarfraz Khurshid,et al.  Automated SQL query generation for systematic testing of database engines , 2010, ASE.

[11]  Klaus Haller,et al.  The test data challenge for database-driven applications , 2010, DBTest '10.

[12]  Mark Harman,et al.  A Theoretical and Empirical Study of Search-Based Testing: Local, Global, and Hybrid Search , 2010, IEEE Transactions on Software Engineering.

[13]  Michael Stuart,et al.  Understanding Robust and Exploratory Data Analysis , 1984 .

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

[15]  Rico Wind,et al.  Simple and realistic data generation , 2006, VLDB.

[16]  Gregory M. Kapfhammer,et al.  Dynamic invariant detection for relational databases , 2011, WODA '11.

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

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

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

[20]  Carsten Binnig,et al.  QAGen: generating query-aware test databases , 2007, SIGMOD '07.