DBMS_PLSQL_CODE_COVERAGE package provides an interface for the collection of code coverage data of PL/SQL applications at the basic block level.
DBMS_PLSQL_CODE_COVERAGE package provides an interface for collecting code coverage information at the basic block level of PL/SQL applications. A basic block refers to a single entry single exit block of PL/SQL code. PL/SQL developers want to know how well their test infrastructure exercised their code. The coverage tables are created using the
A typical code coverage run in a session involves calls to :
Run PL/SQL code
Oracle Database Development Guide for more information about using PL/SQL basic block coverage to maintain quality
Oracle Database PL/SQL Language Reference for the
COVERAGE PRAGMA syntax and semantics
Oracle Database PL/SQL Language Reference for more information about the PLSQL_OPTIMIZE_LEVEL compilation parameter
The user must have
EXECUTE privilege on the DBMS_PLSQL_CODE_COVERAGE package.
The user must have
CREATE privilege on the unit to collect coverage information about this unit.
Coverage information is not collected for wrapped units.
This table lists the
DBMS_PLSQL_CODE_COVERAGE subprograms and briefly describes them.
This procedure creates the tables used for coverage data collection.
DBMS_PLSQL_CODE_COVERAGE.CREATE_COVERAGE_TABLES ( FORCE_IT IN BOOLEAN DEFAULT FALSE);
The default is to raise an error if the coverage tables already exists. If set to TRUE, the tables are dropped silently if the tables already exist, and new tables are created.
Table 119-2 CREATE_COVERAGE_TABLES Exceptions
This function starts the coverage data collection in the user’s session and returns a unique identifier
RUN_ID for the run.
DBMS_PLSQL_CODE_COVERAGE.START_COVERAGE ( run_comment IN VARCHAR2) RETURN NUMBER;
Allows the user to name a run and identify the test.