Difference between revisions of "Checkapi"
m (→Examples) |
m |
||
Line 5: | Line 5: | ||
./soffice "-accept=socket,host=0,port=8100;urp;" | ./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: | |
./soffice "-accept=pipe,name=$USER;urp;" & # Unix | ./soffice "-accept=pipe,name=$USER;urp;" & # Unix | ||
soffice "-accept=pipemname=%USERNAME%;urp;" # Windows | soffice "-accept=pipemname=%USERNAME%;urp;" # Windows | ||
Line 11: | Line 11: | ||
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. | 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 | + | Now you can start CheckApi with an object as argument to test : |
checkapi -o <nowiki>sw.SwXBodyText</nowiki> | checkapi -o <nowiki>sw.SwXBodyText</nowiki> | ||
The ''runner'', which is called inside of the CheckApi, connects to the office and executes the UnoApiTest for the ImplementaionObject <nowiki>sw.SwXBodyText</nowiki>. 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. | The ''runner'', which is called inside of the CheckApi, connects to the office and executes the UnoApiTest for the ImplementaionObject <nowiki>sw.SwXBodyText</nowiki>. 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. | ||
Line 40: | Line 40: | ||
=== Parameter === | === Parameter === | ||
− | To control the CheckApi you can | + | To control the CheckApi you can use the RunnerProps file or some command line parameter. |
− | The priority of the | + | The priority of the parameters are: |
# command line parameter | # command line parameter | ||
# [[RunnerProps]] parameter | # [[RunnerProps]] parameter | ||
# defaults | # defaults | ||
− | == Command line parameter == | + | ----- |
+ | |||
+ | === Command line parameter === | ||
;-log true: enhance the logging output | ;-log true: enhance the logging output | ||
;-debug true: enabled the debugging mode: enhancing of output | ;-debug true: enabled the debugging mode: enhancing of output | ||
;-p ''Project'':one complete project | ;-p ''Project'':one complete project | ||
;-sce ''[[ScenarioFile]]'':all jobs which are contained in the ScenarioFile | ;-sce ''[[ScenarioFile]]'':all jobs which are contained in the ScenarioFile | ||
− | ;-o ''Test-Object'': | + | ;-o ''Test-Object'':the ImplementationObject which should be tested |
;-tdoc ''Test-Document-Path'':path where testdocuments could be found | ;-tdoc ''Test-Document-Path'':path where testdocuments could be found | ||
;-<nowiki>AutoRestart true</nowiki>:forces to restart the office if one test crashes the office. Useful in [[ScenarioFile]] | ;-<nowiki>AutoRestart true</nowiki>:forces to restart the office if one test crashes the office. Useful in [[ScenarioFile]] | ||
− | ;-<nowiki>KeepDocument</nowiki>:the tests | + | ;-<nowiki>KeepDocument</nowiki>: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 | ;-ini ''[[RunnerProps]]'': path to property file for CheckAPI. Default: $HOME/.runner.props | ||
[[Category:QA]] | [[Category:QA]] | ||
[[Category:UNO-API]] | [[Category:UNO-API]] |
Revision as of 19:03, 25 October 2007
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)
Howto
At first you have to run a connectable office. This could be done by:
./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:
./soffice "-accept=pipe,name=$USER;urp;" & # Unix soffice "-accept=pipemname=%USERNAME%;urp;" # Windows
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
Examples
- 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.
Parameter
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
- defaults
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
- -KeepDocument
- 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