Automatic Database Instance Generation for Testing Database Applications

Test data preparation phase of the process of testing a database application deals with the generation of a database instance to run a sequence of queries of interest on this instance. We propose a method that takes a database schema, a sequence of queries representing a test case along with their associated properties, and form a Constraint Satisfaction Problem by considering the interactions among queries and integrity constrains. Solution of this CSP is the initial database instance which satisfies the property associated with each query, and is consistent with respect to integrity constraints.