Test Script with other types of varibles

ivon

Member
Test script has predefined types of variables that can be passed to a stored procedure as parameters. How can I test a stored procedure that has as parameter a collection type with test script.
 
You can create a local collection variable in the Test Script and after calling the procedure you can open a cursor to query the collection. For example:

Code:
declare
  depts tdepts;
begin
  depts := tdepts();
  collection_test(depts);
  open :dept_cursor for select * from table(depts);
end;

In this case we added a local "depts" variable of collection type "tdepts", which is passed to the "collection_test" procedure. After the call a cursor is opened for the collection. The cursor variable is declared as bind variable, and its result set can be viewed by clicking on the cell button [..].
 
Back
Top