Constraint-based test database generation for SQL queries

Claudio de la Riva, María José Suárez-Cabal, Javier Tuya
2010 Proceedings of the 5th Workshop on Automation of Software Test - AST '10  
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
more » ... 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.
doi:10.1145/1808266.1808276 dblp:conf/icse/RivaCT10 fatcat:etvh42tvvfehrgs4jhqbaby2oa