Toad World® Forums

move procedure into a package and retain tests


#1

I have written a procedure and unit tests for this procedure. Now I would like to put the procedure in a package and run my tests against it. What is the easiest way to point the test that I wrote for the standalone procedure to the procedure that is now in a package?

Thanks,
Chris


#2

Chris,

One of our priorities for upcoming releases of Code Tester is to automate the process of code evolution (new arguments, changed names, etc.). Today, you must make manual changes for the most part to adapt existing test definitions to changes in programs.

As for your particular change…I am going to give you a quick piece of advice, and then think about it some more (and possibly come up with a better answer):

What you should do immediately is create the package with the program, and then modify the procedure to simply be a “pass through” to call the packaged program.

Leave the test definition as is.

This is obviously sub-optimal, but that may be the best/simplest we can offer right now. Hopefully more soon…

SF


#3

Thanks Steven for your quick reply. The Unit testing tool is really great and I know it will be made even better. I hope this feature of moving objects and their tests will be addressed in the next releases.

Also, thanks a ton for your Oracle PL/SQL Programming book. It is considered the bible for PL/SQL in our shop and we refer to it very often.

-Chris


#4

Thanks for your kind words, Chris. I very much appreciate them.