PubTest is used to ensure that resources published by a Composite server are functioning properly. Every time a new resource is published, a test should be added to PubTest’s input file to test that new resource.
PubTest should then be run immediately before exporting from a development instance, to check for regressions. PubTest should also be run on an instance after every import to check for regressions and to ensure that the import works.
Syntax to execute pubtest.bat file:
============
pubtest.bat -host <hostname> -dbPort <TDV baseport+1> -wsPort <ws port> -user <username> -password <password> -domain <domain name> -input pubtest_sample.dat -printOutput true -encrypt false
Note: The '-input' parameter points to the 'pubtest_sample.dat' file by default. This file contains the query or web service calls to verify that the server is functioning properly. Instead of the 'pubtest_sample.dat', the user can also specify another text file with a .dat or .txt extension.
Below are the contents of the 'pubtest_sample.dat' file:
===============
[QUERY]
database=system
select * from ALL_DOMAINS
where DOMAIN_NAME like 'c%'
[PROCEDURE]
database=examples
{ CALL LookupProduct(1) }
#[PROCEDURE]
#database=ds
#outTypes=INTEGER
#{ CALL procedure_with_one_integer_output(3,?) }
[WEB_SERVICE]
path=/services/system/admin/resource/resourcePort.ws
action=resourceExists
contentType=text/xml;charset=UTF-8
<soap-env:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Body>
<ns1:resourceExists xmlns:ns1="http://www.compositesw.com/services/system/admin/resource" >
<ns1:path>/services/databases/system/ALL_DOMAINS</ns1:path>
<ns1:type>TABLE</ns1:type>
</ns1:resourceExists>
</soap-env:Body>
</soap-env:Envelope>
===============