Difference between revisions of "Checkapi"
(UNO-API testing main script) |
m |
||
Line 43: | Line 43: | ||
The priority of the parameter is: | The priority of the parameter is: | ||
# command line parameter | # command line parameter | ||
− | # RunnerProps parameter | + | # [[RunnerProps]] parameter |
# defaults | # defaults | ||
Line 53: | Line 53: | ||
;-o ''Test-Object'':The ImplementationObject which should be tested | ;-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 normaly closes the documents which opened for testing purposes. If this flag is set to ''true'' all documents are available at the end of the test. | ;-<nowiki>KeepDocument</nowiki>:the tests normaly closes 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 |
Revision as of 13:21, 16 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;"
When being on a machine used by more people, you should use a named pipe instead. You have to 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 call CheckApi with an object to test as argument:
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 hole project 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 uses the RunnerProps file or some command line parameter.
The priority of the parameter is:
- 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 normaly closes 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