Search-Based Test Data Generation for SQL Queries
More Info
expand_more
Abstract
Software testing is an important, well-researched field.
With the majority of modern-day applications using relational databases to manipulate their data, it is crucial that database interactions are tested as well.
This is a complex task to perform manually, and thus researchers have been attempting to tackle this problem by means of automated test data generation.
In their studies, they apply constraint-based techniques using SAT solvers to generate the test data.
However, these techniques have known limitations such as solving subqueries.
In this thesis, we present a novel search-based approach that uses a Genetic Algorithm to generate test data for SQL queries, which overcomes the limitations of previous research.
We provide an implementation of our approach, EvoSQL.
In our implementation, we instrument a real database to extract all the information necessary for the fitness function. By doing so, we support all queries using standard SQL syntax.
We evaluate our approach on 2,135 queries from 4 real-world systems, of which EvoSQL is able to cover over 96% fully.