| || |
Running Silk Script from JUnit
I was wondering if it is possible to launch SilkTest and run some predefined Silk scripts from JUnit code. After the tests complete, then I would like to use JUnit to close SilkTest. Although the Opening and Closing of SilkTest is optional, I do need to be able to run specified ST scripts and determine when they have completed. Does anyone know how this can be done or where I can obtain information and examples?
Alternatively, if there is a mechanism to allow one to run SilkTest scripts from a batch file, I could always launch the batch file from JUnit.
Re: Running Silk Script from JUnit
OK, I can answer this now.
SilkTest can be started from the command line to run a specified test or suite of tests. To learn how this can be done, search for "command line switches" in the help files.
In short, one can run a test script from the command line as such:
> partner -r c:\IndxTest\scripts\myscript.t
Check out the other switches to see what else can be done from the command line. For instance, one might want to close SilkTest after the test runs, in which case the -q switch is appropriate.
To answer this question, one can create a batch file with the appropriate command line and call this batch file from within JUnit.