************************************ NOTE: In 1.8.3 and 1.8.4, the advice given in this document will NOT WORK. We hope to have it fixed in 1.9, but in the meantime, if you want to test private programs, you must expose them in the package spec WITHOUT conditional compilation. Sorry.... ************************************
Most of our non-trivial packages contain many more subprograms defined in the package body, than in the package specification. These are "private" – they cannot be called by any program not defined in that same package.
Yet we also often want to test those subprograms. Unfortunately, Code Tester must follow the same rules as any other session/program connected to Oracle: if the program is private it cannot be called directly.
This document explains how to make these subprograms available for testing. In general, you will have to add the private program headers to the package specification. You have the following options to achieve this:
• Manually add and remove the headers of the private programs to/from the package specification.
• Use conditional compilation to add/remove headers without manual editing each time.
|