General User Guide
The main class of the framework is org.openoffice.Runner
If you downloaded the prepared package there will be already
scripts to start this class with the abilitity to execute Java and
Basic testcases called executeJava and executeBasic
repectively.
At least a test job must be given, this can be a single implementation object or even a single Interface/Service of an implementation object as well as a complex scenario of such cases.
- java org.openoffice.Runner -o sw.SwXCell will execute only sw.SwXCell
- java org.openoffice.Runner -o sw.SwXBodyText::com::sun::star::text::XText will execute the test for the Interface XText of SwXBodyText
- java org.openoffice.Runner -sce <the_path>/senario.sce will execute each job in the scenario file
#Sample scenario file -o sw.SwXCell -o sc.ScCellObj -o sw.swXBodyText::com::sun::star::text::XTextIn the prepared package you'll find a scenario file (api.sce) that contains all testcases. This can be executed using the command
./execute(Java|Basic) -sce api.sce (Unix) execute(Java|Basic).bat -sce api.sce (Windows)
At least the jar files ridl.jar, unoil.jar, sandbox.jar, jurt.jar, juh.jar, and java_uno.jar , which are located in '<Office_Path>/program/classes', must be part of your CLASSPATH, as well as the classes of the framework and tests.
To be able to connect the office via the Java-UNO bridge it must be started 'connectable'. This means you start the office as follows:
<Office_Path>/program/soffice "-accept=socket,host=localhost,port=8100;urp;" (unix/linux) <Office_Path>\program\soffice.exe -accept=socket,host=localhost,port=8100;urp; (windows)You can also let the Runner itself start the Office by setting the AppExecutionCommand parameter:
AppExecutionCommand=<Office_Path>/program/soffice -accept=socket,host=localhost,port=8100;urp;
In the second case the Runner tries to start the Office, if it can't connect. So you'll have to make sure that no Office-instance is already running.
In both cases make sure that the quickstarter (Windows only) isn't running.
For more information about connecting the Office from external applications, confer the Developer's Guide of OpenOffice.org, chapter First Steps.
When the Runner starts, it first searches for a property file. If the parameter-ini <Full_Path>is given it takes this on otherwise it searches in the home directory and the current path for a file named runner.props (Win) and .runner.props (Unix) respectively. If no property file is given, the defaults are used.
Afterwards it parses the command line arguments and finally searches the desired value set for the given job(s). This value set is given in form of so called object descriptions which can be found in the objdsc-subdirectory of qadevOOo. Then the job(s) is/are executed and the result is displayed on screen.
You can define an arbitrary number of parameters, here are some predefined:
Parameters |
|||
Name |
Description |
||
---|---|---|---|
ConnectionString (cmdLine: -cs) |
The Connection String used to connect the Office |
||
AppProvider |
Provides access to the Application, will be filled at Runtime if the test harness starts the Office |
||
ProcessHandler |
Provides access to the running Process, will be filled at Runtime if the test harness starts the Office |
||
AppExecutionCommand (cmdLine -cmd) |
Defines the executable to be started, default is an empty String |
||
TestBase (cmdLine -tb) |
Defines the testbase to be used |
||
ServiceFactory |
The ServiceFactory gained from the Application the harness connects too. Is filled at Runtime. |
||
DescriptionPath (cmdLine -objdsc) |
Path to the descriptions that contain the desired value set, this is by default empty |
||
TestDocumentPath (cmdLine -tdoc) |
The path to the folder where the documents used by the testcases can be found. Points by default to the temp-directory |
||
LoggingIsActive |
Defines if the testcase logs are printed out
|
||
DebugIsActive |
Defines if debug information is printed out
|
||
TestJob |
Defines the test job to run. Is filled during Runtime |
||
LogWriter |
Name of the class used for logging purposes |
||
OutProducer |
Name of the class used for summarizing purposes |
||
TimeOut |
If the Office is started by the frame work this is the time
after which a reaction is expected, otherwise the Office will be declared
as hanging and killed. |
||
BASICBRIDGE |
Path to the file BasicBridge.sxw, normally located in the testdocs folder. |
||
BASICRESPTH |
Path to the basic sources. |
Last Modified: $Date: 2004/03/10 15:58:39 $