Artigo Acesso aberto Revisado por pares

Full predicate coverage for testing SQL database queries

2010; Wiley; Volume: 20; Issue: 3 Linguagem: Inglês

10.1002/stvr.424

ISSN

1099-1689

Autores

Javier Tuya, María José Suárez‐Cabal, Claudio de la Riva,

Tópico(s)

Logic, programming, and type systems

Resumo

Abstract 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.

Referência(s)