Toad World® Forums

Testing API's



I use a few different tools for testing databases and testing the packages and
the API’s that are created.

I really do like Toad, except for one key area. This is the ability to test an
API quick and easy.

I have yet to find a real good easy way to do this in Toad, but in PL/SQL
Developer I do it as follows.

I find the API, it may be a stand alone or in a package.
Then I right clink on the API
In the context menu I select Test
This in turn shows me a test window, and here I enter in my input data
I exec the API
Then in the test with I can also see the cursor and view the data.

It is so easy to do, and with the power that Toad has in some many other areas I
find it hard to believe that testing should be so hard.

I am not wanting to alter the code as this is always a pain point for QA, do not
alter the code

Any thoughts ?

Thanks for your time


You can execute any pl/sql program and the cursor returned will be displayed in
a grid, does that help?

Execute your program from the browser, the data will come back.



Thanks for the reply.

This is kind of that I an looking for, may be i am going about this the hard
way. I test bother functions and procedures. Here is a same of how I more times
then not can get a procedures to allow me to see the output cursor.

Steps need:

I find the Package that the procedure is in using ‘Schema Browser’

Single click so I may see the code in the Right Hand Side on the App

Then I click on the ’ Lighten Bolt’ on the Package Tab

This brings up the 'Set Parameters; Pop up window.

Here I set the Arguments

Then click on the Options tab.

Check 'Print OUT Arguments/RETURN values to DBMS Output ---- I also selct the
radio button 'Load into grid from memory (Strong and weak)

For a Function I have not found a mthod yet.

How however for PL/SQL Dev. for both a Function and Procedure here are the

First find the Function and Procedure and right click

In the right hand side of the app - you should see a test window

Enter in the Arguments

Exec the Arguments ( or step into debug mode)

Then in the data grid look at the results if a function or double click to
expaned the cursor.

If anyone can point me to a PDF / white paper that outlines the best way to test
such things in Toad that would be Great.

I really want to get to to point of having just one app, and for most all other
tasks Toad Wins, but this one alone is a show stopper.

The method to test should be short and sweet like the rest of the app.




The method you described for packages works exactly the same for functions and procedures.