unit testing queries

Hi all,

I've just downloaded PL/SQL Developer with the aim of utilising the unit testing facilities on offer.
While I've had no problem setting up the test I'm at a bit of a loss as to what to do next. I can't seem to find any assert methods with which to validate the test method's behavior. When I tried to use ut/plsql the methods threw exceptions.
So my question is, what if any framework is available in the application and if there is none how can I get ut/plsql to work?

Thanks for any help
 
Thomas,

Read the Help info for the Test Manager carefully. It's a good first-step towards unit regression testing, but it's not complete, IMHO.

Basically your test script needs to use test variables for input and output that pass from the TM to the script. Back in the TM, you enter expected values for the output variables in the output column. If the returned values don't match, it's marked a failure.

Here's the simplest possible example of a test script:

Code:
-- Created on 5/3/2007 by STEWART_L_STRYKER
DECLARE
    -- Local variables here
    i INTEGER;
BEGIN
    -- Test statements here
    :return_val := SUBSTR(:input_val, :start_pos, :len);
END;
Once I save it, the TM window knows it exists and pulls in the variables.

Good luck,
 
Back
Top