wtPLSQL Project

wtPLSQL is a white-box testing framework for Oracle database objects.

Website Home Page


wtPLSQL Definitions

These are the working definitions for the wtPLSQL project.

Annotation - PL/SQL comment used to identify a DBOUT or ignore source code lines from code coverage data.

Assertion - A function that performs a single test and records/reports the result.

Coverage - An indication of the amount or percentage of source code tested.

DBOUT - Database Object Under Test. The database object that is the target of testing. White-box testing is oriented toward a specific DBOUT. Code coverage is also oriented toward a specific DBOUT.

Setup - Modifying the database or environment in preparation for an assertion, testcase, or group of either.

Teardown - Restoring a database or environment after an assertion, testcase, or group of either.

Testcase - A logical grouping of assertions to run happy path, decision tree, boundary condition, and/or fault insertion tests. May included one or more setup, teardown, and intermediate setups.

Test Runner - A PL/SQL package that exercises a DBOUT and uses assertions to confirm the correct funcionality of the DBOUT. It may have zero or more testcases. It always contains a call to the WTPLSQL.TEST_RUN procedure. It may contain DBOUT annotations and “ignore source lines” annotations.

Oracle Database

Note: Some Oracle database terms overlap with Object Oriented terms.

Database Object - Listed in USER_OBJECTS. Examples include packages, types, and tables.

Schema - Database owner of a database object.


These definitions were taken from Xunit at Wikipedia. They include minor editing for clarification.

Test runner - An executable program that runs tests implemented using an xUnit framework and reports the test results.

Test case - The most elemental class. All unit tests are inherited from here.

Test fixtures - Also known as a test context. The set of preconditions or state needed to run a test. The developer should set up a known good state before the tests, and return to the original state after the tests.

Test suites - Set of tests that all share the same test fixture. The order of the tests shouldn’t matter.

Test execution - The execution of an individual unit test including:

The setup and teardown serve to initialize and clean up test fixtures.

Test result formatter - Produces results in one or more output formats. In addition to a plain, human-readable format, there is often a test result formatter that produces XML output. The XML test result format originated with JUnit but is also used by some other xUnit testing frameworks, for instance build tools such as Jenkins and Atlassian Bamboo.

Assertions - A function or macro that verifies the behavior (or the state) of the unit under test. Usually an assertion expresses a logical condition that is true for results expected in a correctly running system under test (SUT). Failure of an assertion typically throws an exception, aborting the execution of the current test.


These definitions were taken from the JUnit Team at GitHub

Assertion - JUnit provides overloaded assertion methods for all primitive types and Objects and arrays (of primitives or Objects).

Test Runners - JUnit provides tools to define the suite to be run and to display its results. To run tests and see the results on the console, run this from a Java program.

Suite - Using Suite as a test runner allows you to manually build a suite containing tests from many classes.

Execution Order - From version 4.11, JUnit will by default use a deterministic, but not predictable, order(MethodSorters.DEFAULT). To change the test execution order simply annotate your test class using @FixMethodOrder and specify one of the available MethodSorters

Test Fixture - A test fixture is a fixed state of a set of objects used as a baseline for running tests. The purpose of a test fixture is to ensure that there is a well known and fixed environment in which tests are run so that results are repeatable.

JUnit XML For Jenkins

These definitions are based around the JUnit XML for Jenkins requirement. There is some translating required as the Oracle database is relational, not object oriented. Additionally, the Jenkins XML specification has some nuances that are not obvious.

How Jenkins CI Parses and Displays JUnit Output

Class - Java Unit Under Tested (UUT). In the Oracle database, this equates to a database object

Package - Collection of Classes. In the Oracle database, this equates to a database schema.

Assertion - Simple PASS/FAIL test.

TestCase - Collection of Assertions with a common Class.

TestSuite - Collection of TestCases.


These Java definitions are provided for reference

Object - In computer science, an object can be a variable, a data structure, or a function, and as such, is a location in memory having a value and possibly referenced by an identifier. See also Object at Wikipedia

Class - In object-oriented programming, a class is an extensible program-code-template for creating objects, providing initial values for state (member variables) and implementations of behavior (member functions or methods). See also Class at Wikipedia

Website Home Page