The CheckApi script is a simple script to run the UnoApiTest""s inside a solar shell for one ImplementaionObject with one or more interface tests. The CheckApi is based on the runner (see http://qa.openoffice.org/qadevOOo_doc/index.html)
At first you have to run a connectable office. This could be done by:
./soffice "-accept=pipe,name=$USER;urp;" & # Unix soffice "-accept=pipemname=%USERNAME%;urp;" # Windows
Since CwsCheckApi is available the connection via socket is not the default anymore.
DEPRECATED ./soffice "-accept=socket,host=0,port=8100;urp;"
In case of working on a shared machine, you should use a named pipe instead. Add the usage of the pipe in the RunnerProps file and start the office like this:
You can use any unique name as pipe name, but as the user-name is very well suited for this purpose, it is a good idea to use it.
Now you can start CheckApi with an object as argument to test :
checkapi -o sw.SwXBodyText
The runner, which is called inside of the CheckApi, connects to the office and executes the UnoApiTest for the ImplementaionObject sw.SwXBodyText. Since CheckApi knows all interfaces of the ImplementationObject all correspond interface tests will be executed. At the end of such a test you will get a result of the test run.
***** State for sw.SwXBodyText ****** Whole component: PASSED.OK ************************************* Job -o sw.SwXBodyText done
- checkapi -o sw.SwXBodyText
- checks all interfaces on the ImplementationObject sw.SwXBodyText
- checkapi -o sw.SwXBodyText::com::sun::star::text::XText
- checks the interface com::sun::star::text::XText on the ImplementationObject sw.SwXBodyText
- checkapi -o sw.SwXBodyText::com::sun::star::text::XText,com::sun::star::text::XTextRange
- checks the interface com::sun::star::text::XText and the inteface com::sun::star::text::XTextRange on the ImplementationObject sw.SwXBodyText
- checkapi -o sw.SwXBodyText::com::sun::star::text::Text -log true
- checks all properties of the service com::sun::star::text::Text on the ImplementationObject sw.SwXBodyText with enhanced output.
- checkapi -p fwk
- checks the module fwk with all its ImplementationObject's.
- checkapi -sce myScenarioFile
- checks all objects and projects which described in the ScenarioFile.
To control the CheckApi you can use the RunnerProps file or some command line parameter.
The priority of the parameters are:
- command line parameter
- RunnerProps parameter
Command line parameter
- -log true
- enhance the logging output
- -debug true
- enabled the debugging mode: enhancing of output
- -p Project
- one complete project
- -sce ScenarioFile
- all jobs which are contained in the ScenarioFile
- -o Test-Object
- the ImplementationObject which should be tested
- -tdoc Test-Document-Path
- path where testdocuments could be found
- -AutoRestart true
- forces to restart the office if one test crashes the office. Useful in ScenarioFile
- the tests normally close the documents which opened for testing purposes. If this flag is set to true all documents are available at the end of the test.
- -ini RunnerProps
- path to property file for CheckAPI. Default: $HOME/.runner.props