Cómo medir la cobertura de las pruebas en SQL|How to measure SQL test coverage

{{title}}

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 (FPC) allows to evaluate the coverage or complex queries and was first published in:

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

Given a query, FPC 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 test database: If it returns any row then the situation that represents is covered

The TdRules (formerly named SQLRules) toolset supports the generation and evaluation of FPC coverage rules (via a REST API Service or Web and Desktop client applications)