utPLSQL logo

[ Home | Getting Started | Build Test Packages | Examples | User Guide | Release Notes | Document Map ]

< Previous Section: Getting Started | Next Section: The Four Step Program to using utPLSQL >

Glossary and Requirements

Glossary

Before diving into the details, let's make sure we have a common vocabulary.

Unit Test

A test of a single unit or program. Suppose you have built product.total_sales, a function to calculate and return total sales of the specified product for a given date period. You will then build a single procedure to perform the test for that function.

Test Case

Individual cases or test scenarios for a unit test. You will want to try out different scenarios (valid and invalid product Ids, various date ranges, etc.). Each different combination of inputs (parameter values) is a different test case. These are bundled up and executed within the single unit test procedure.

Package Test

A set of unit tests which test the functionality of all programs in a single PL/SQL package (or a single stand-alone program unit - procedure or function).

The way utPLSQL works today, you must define your various tests cases and unit tests within a test package (though it could be the same package containing the functionality).

Test Suite

A series of package tests. Obviously, any application of non-trivial complexity will consist of multiple packages, each covering their own area of functionality. A test suite contains a series of packages that can then be tested in sequence by executing the test suite as a whole.

Requirements

If you are using Oracle8i or above, utPLSQL takes advantage of a number of Oracle8i features, including autonomous transactions, invoker rights and native dynamic SQL. utPLSQL will however still run on Oracle7 (7.3.4 and above) and Oracle8.

Requirements for using utPLSQL include:

Requirements for Executing Test Code

If you install and use utPLSQL from within a single schema (ie, the same schema that owns utPLSQL code and tables owns the code you want to test, as well as the test packages), then no additional privileges are needed.

If, however, you install utPLSQL in a shared schema and then access it from other schemas, you may need to grant additional privileges to the utPLSQL schema. utPLSQL uses dynamic PL/SQL to run the test code. It therefore requires directly granted EXECUTE privileges on those code elements (both the code to be tested and the test packages) -- or the AUTHID CURRENT_USER capability of Oracle8i and above.

For Oracle8i and above

You do not need to grant any additional privileges, unless you want to test code owned by one schema from another schema. In that case, you will need to grant EXECUTE to the schema from which you run your tests on both the code to be tested and the test package.

For Oracle7 and Oracle8

You must grant EXECUTE to the utPLSQL schema on both the code to be tested and the test package. These grants must be made directly and not through roles.

< Previous Section: Getting Started | Next Section: The Four Step Program to using utPLSQL >

utPLSQL logo

Valid XHTML 1.0 Strict