SQL Coverage

A test coverage criterion allows to determine what situations of interest shall be tested in a particular application. By measuring the coverage the tester may also determine the completeness of the test. When part of the business logic of the program is embodied in SQL statements the conventional criteria (e.g. condition or decision coverage) fall short for deriving adequate test cases:

The SQL Full Predicate Coverage criterion (SQLFpc) allows to evaluate the coverage or complex queries and was first published in:

SQLFpc is based on the principles of Modified Condition Decision Coverage (MCDC) specifically taylored for SQL, which includes:

Given a query, SQLFpc is defined by a set of Coverage Rules, each representing a particular test situation. Each coverage rule is written in SQL and then executed against the database: If it returns any row then the situation that represents is covered

The following tools support the generation and evaluation of SQLFpc coverage rules: SQLFpc (web and web service), SQLRules.