Test window templates in function of result type

Roeland

Member³
The general idea is to enable "Test window" templates, that depends on the result type of the function that you want to test (when you do a right click on a function).

I admit that my use case is mainly for xmltype's.

eg: Test function "My_Package.Get_Xml":

Code:
declare
  -- Non-scalar parameters require additional processing
  result public.xmltype;
begin
  -- Call the function
  result := My_Package.Get_Xml ();
end;

Problem is that I have to alter this again and again to the following structure before I can do anything with it:

Code:
declare
  -- Non-scalar parameters require additional processing
  result xmltype;
begin
  -- Call the function
  result := My_Package.Get_Xml ();

  if result is not null then
    :mClob := result.getclobval();
  else
    :mClob := null;
  end if;
end;

The :mClob is most of the time defined as a clob, if it's a PL/SQL string I can still change it.

So, there's the proposal, make templates that depends on the result type, or change the current implementation for xmltype's.
 
You can also save your test window to a file.
when you need to run your test please open the test window from your saved file.

Or you can use plugins sailora, this plugins provide fast operate to do this. It can save test window with parameters in managed list.
 
I would like test templates also. We use a profile to turn on and off output from instrumented code. One of my solutions is to use auto-replace to insert text into the test script. It would be nicer if text could just be put in the test based on a template.
 
Back
Top