A test script calling another script

greg.mccarty

Member²
As part of my testing, I have a test script (call it setup) that puts my environment in a known state (i.e. tables with records, etc).

Before every other test script, I'd like to invoke the setup test script. I can, of course, do it by hand, but I'd really like each test script to call the setup test script.

Can this be done currently?
 
No, this is currently not possible. You could encapsulate this test script in a stored program unit and call it as the first step of other test scripts though.
 
You could put the call of the setup script into the test window template.

Edit file: \Template\Default\"Test window.tpl"

[$WINDOW TYPE = TEST]
-- Created on $DATE $TIME by $OSUSER
declare
-- Local variables here
i integer;
b boolean;
begin
--Call setup procedure here
setup(x,y);
[#]
end;
 
BWendling,

It's not that I want my test script (call if first.tst) to all a package/procedure.

What I want is my test script to call another plsql developer test script (say second.tst).

So it's plsql dev artifact calling a plsql artifact.
 
greg.mccarty,

Do you need to call a second test script within the same session or, the second one could be called by opening it in a new (test) window?

Joachim Rupik
 
I would like one.tst to call init.tst, execute some stuff, and then call cleanup.tst.

Think of it as the standard steps in a test framework. Init, test, cleanup.

But I was wondering if a .tst could call other .tst's.
 
I exactly understand what you mean!
I asked because you can think a slight different. Imagine that you call your test framework - Init, test, cleanup tst scripts not within test window, but from a script executed in command window.
Such functionality is incorporated in command window and could be easily extended (very simple plug-in)
I also asked about session, because I can easily imagine how to open a bunch of test windows (parallel or with wait on) for different test scripts (many different session in multi session settings), but I don't know how to replace a contents of a test window to call different scripts using the same session - I think it is impossible now.

Joachim Rupik
 
PL/SQL Developer 7.0 has a new Test Manager, which allows you to define a Test Set, mainly for regression testing purposes. A Test Set is basically a collection of Test Scripts, which are executed in a pre-defined order, in a single Test Window. This may cover your needs.

It also allows you to define the required output variable values, so that you can easily run a set of Test Scripts to verify if these tests run okay.
 
I CAN HARDLY WAIT FOR DECEMBER!!!!!!!!!

Yes, I know that November is the target, but 11pm on Nov 31st is too late for me to start checking out the new release.
 
Back
Top