Structural Coverage Criteria for Testing SQL Queries
M. José Suárez-Cabal (University of Oviedo, Spain)
Javier Tuya (University of Oviedo, Spain)
Abstract: Adequacy criteria provide an objective measurement of test quality. Although these criteria are a major research issue in software testing, little work has been specifically targeted towards the testing of database-driven applications. In this paper, two structural coverage criteria are provided for evaluating the adequacy of a test suite for SQL queries that retrieve information from the database. The first deals with the way in which the queries select and join information from different tables and the second with the way in which selected data is further processed. The criteria take into account both the structure and the data loaded in the database, as well as the syntax and semantics of the query. The coverage criteria are subsequently used to develop test inputs of queries drawn from a real-life application. Finally, a number of issues related to the kind of faults that can be detected and the size of the test suite are discussed.
Keywords: SQL testing, database testing, test adequacy criteria, test coverage