This article was published online on [15 January 2010]. An error was subsequently identified. This notice is included in the online and print versions to indicate that both have been corrected [18 March 2010].
Full predicate coverage for testing SQL database queries†
Article first published online: 15 JAN 2010
Copyright © 2010 John Wiley & Sons, Ltd.
Software Testing, Verification and Reliability
Volume 20, Issue 3, pages 237–288, September 2010
How to Cite
Tuya, J., Suárez-Cabal, M. J. and de la Riva, C. (2010), Full predicate coverage for testing SQL database queries. Softw. Test. Verif. Reliab., 20: 237–288. doi: 10.1002/stvr.424
- Issue published online: 1 SEP 2010
- Article first published online: 15 JAN 2010
- Manuscript Accepted: 2 NOV 2009
- Manuscript Revised: 16 SEP 2009
- Manuscript Received: 27 FEB 2009
- Department of Science and Innovation (Spain) and ERDF Funds. Grant Number: TIN2007-67843-C06-01 [Correction made here after initial online publication.]
- Government of the Principality of Asturias. Grant Number: CN-07-168
- Government of Castilla-La Mancha. Grant Number: PAC08-121-1374
- software testing;
- database testing;
- full predicate coverage;
In the field of database applications a considerable part of the business logic is implemented using a semi-declarative language: the Structured Query Language (SQL). Because of the different semantics of SQL compared with other procedural languages, the conventional coverage criteria for testing are not directly applicable. This paper presents a criterion specifically tailored for SQL queries (SQLFpc). It is based on Masking Modified Condition Decision Coverage (MCDC) or Full Predicate Coverage and takes into account a wide range of the syntax and semantics of SQL, including selection, joining, grouping, aggregations, subqueries, case expressions and null values. The criterion assesses the coverage of the test data in relation to the query that is executed and it is expressed as a set of rules that are automatically generated and efficiently evaluated against a test database. The use of the criterion is illustrated in a case study, which includes complex queries. Copyright © 2010 John Wiley & Sons, Ltd.