You are here: Available Utilities > J > JAVA TEST UTILITY

JAVA TEST UTILITY

Use this utility to send requests to Docupresentment using single or multiple threads. The threads utility lets you send test messages to Docupresentment. It can send one test message at a time or it can create multiple threads to send concurrent test messages to Docupresentment. It also supports sending rowsets and attachments in a test message.

Additionally, it can process all messages contained in a receive.msg file that was generated by Docupresentment by enabling the capturing of said file through the appropriate log4j options (see the ReceiveMessage category and ReceiveMessage appender sections in the logconf.xml file for Docupresentment). This is useful when you need to recreate an error in another Docupresentment environment by running the same request messages on it.

You can invoke the test utility via the threads script included with Docupresentment. Typically, the threads script for the Windows platform is called threads.bat whereas the one for the UNIX platform is called threads.sh.

Note You must have Java version 5 or later installed to use this test utility. You must also have the latest DocuCorpUtil.jar and watchdog.jar files.

If you invoke the test utility without any arguments, it displays usage information.

 

Parameter

Description

properties | configuration | config

(Required) The name of a properties or XML configuration file in the same format as a docclient.xml file containing the marshaller, queue factory, and message bus properties to use.

Here is an example of a properties file:
marshaller.class=com.docucorp.messaging.data.marshaller.SOAPMIMEDSIMessageMarshaller
queuefactory.class=com.docucorp.messaging.http.DSIHTTPMessageQueueFactory http.url=http://localhost:49152

Here is an example of an xml configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<section name="DocumentClient">
<section name="messaging">
<section name="queue">
<entry name="marshaller.class">com.docucorp.messaging.data.marshaller.SOAP MIMEDSIMessageMarshaller</entry>
<entry name="queuefactory.class">com.docucorp.messaging.http.DSIHTTPMessag eQueueFactory</entry>
<entry name="http.url">http://localhost:49152</entry>
</section>
</section>
</section>
</configuration>

message | msg

The name of a message file you want the utility to use to compose a request message. The default is an SSS request message.

Here is an example of the new format; which supports messagevars, text files, binary files, and rowsets sections:
[ messagevars ]
requestype=sss
config=sampco
userid=docucorp
[ textfiles ]
ATTACHMENT1=test.xml
[ binaryfiles ]
ATTACHMENT2=test.pdf
[ rowsets ]
count=2
rowset.1.name=records
rowset.1.rows=2
rowset.1.row.names=a,b,c
rowset.1.row.1.values=value1,value2,value3
rowset.1.row.2.values=value1,value2,value3
rowset.2.name=tables
rowset.2.rows=1
rowset.2.row.names=table,location
rowset.2.row.1.values=wip,mstrres\amergen\wip

Here is an example of the old format, which just includes name/value pairs:
reqtype=sss
config=SAMPCO

msgvars

Include additional, colon-delimited message variables from the command line that should be added to the request message.

Here is an example:
threads msgvars=reqtype=sss:config=SAMPCO

reqtype

Enter the request type present in the server configuration (docserv.xml) file. The default is SSS.

transfile | receivefile

Enter the name of a file that contains one or more requests processed by Docupresentment. For example, this could be a receive.msg file generated by Docupresentment via the appropriate debug options.

This is useful when you are trying to recreate an error reported when the end user provides this file.

buffer

Specify a file containing a SOAP message that you want placed directly into the queue. For example, this could be a receive.msg file generated by Docupresentment via the appropriate debug option and which contains a single request that was processed by Docupresentment.

This is useful when you are trying to recreate an error reported when the end user provides this file. This is also useful when you are testing request messages generated by third party applications.

nothreads

Enter the number of threads you want to create. Use this parameter with the notrans parameter, where for each thread N in nothreads, notrans transactions are run. The default is one (1) thread.

timeout

Enter the timeout value to use in milliseconds for each transaction. The default is 60000 ms (60 seconds).

display

Enable this parameter to display the result message returned by Docupresentment. The default is False.

time

Enable this parameter to display the time for each thread's transaction and the total processing time for all transactions (all threads). The default is False.

infinite

Use this parameter to specify whether to process the specified number of threads in an infinite loop. For instance, if you specify True, the loop continues to generate the specified number of threads after the interval expires. Use this parameter with the interval parameter. The default is False.

interval

Enter, in milliseconds, an interval value in which the infinite loop will again spawn the number of threads specified. Use this parameter with the infinite parameter. The default is 1000 ms (1 second).

notrans

This parameter specifies the total number of transactions to process for each thread. Use this value with the nothreads parameter, where for each thread N in nothreads, notrans transactions are run. The default is one (1).

msgno

Use this parameter with the transfile or receivefile parameter. It should indicate a message number present in the transaction file specified, which is used to generate a request.

range

Use this parameter with the transfile or receivefile parameter. It should specify a range of message numbers present in the transaction file specified, which are used to generate requests, such as 1,5.

msglist

Use this parameter with the transfile or receivefile parameter. It should specify a comma-delimited list of message numbers present in the transaction file. These message numbers, such as 1,3,5,7, are then used to generate requests.

unique

Enter True if you want the utility to generate a unique ID. The default is False, which means the message bus will generate the unique ID.

noattchs

The number of file attachments to send per transaction. The utility looks for a file named sendfiles.msg when you specify this parameter. See the description of the sendfiles parameter for details about the format of this file. Use this parameter or the sendfiles parameter but not both.

You can also use the atcfile parameter when you are only sending one attachment. The utility prompts you for the attachment information if needs.

sendfiles

Enter the name of the file that contains the file attachments to send for a transaction. Use this parameter or the noattchs parameter but not both. You can also use the atcfile parameter instead when only sending one attachment. The utility prompts you for the attachment information it needs.

Here is an example file:
name=ATTACHMENT1
file=c:\docserv\test.xml
type=text
name=ATTACHMENT2
file=c:\docserv\test.pdf
type=binary

atcfile

Include this parameter to tell the utility to send one file attachment as part of the transaction. The utility prompts you for the attachment information it needs.

Do not use the noattchs or sendfiles parameters with this parameter.

norcvs

Enter the number of file attachments to receive per transaction. The utility looks for a file named receivefiles.msg when you use this parameter. See the description of the receivefiles parameter for details about the format of this file. You can use this parameter or the receivefiles parameter but not both.

You can also use the rcvfile parameter when you are only receiving one attachment. The utility prompts you for the attachment information it needs.

receivefiles

Enter the name of the file that contains the file attachments to receive for a transaction. Use this parameter or the norcvs parameter but not both.

You can also use the rcvfile parameter instead when only receiving one attachment. The utility prompts you for the attachment information it needs.

Here is an example file:
name=ATTACHMENT1
file=c:\docserv\input-test.xml
name=ATTACHMENT2
file=c:\docserv\input-test.pdf

rcvfile

Include this parameter to tell the utility to receive one file attachment as part of the transaction. The utility then prompts you for the attachment information it needs.

Do not use the norcvs or receivefiles parameters with this parameter.

receivepath

Use this parameter to specify the default location to receive file attachments when the rcvfile, receivefiles, and norcvs parameters are not used. The default is the current directory.

Examples

Here are some Windows examples:

threads.bat config=docclient.xml reqtype=sss time=yes notrans=100

threads.bat config=docclient.xml msgvars=reqtype=tsttest:test=14 display=yes

threads.bat properties=dsimsg.properties message=sss.ini nothreads=300 timeout=30000 display=true time=true infinite=true interval=30000

Here is a UNIX example:

threads.sh display=yes reqtype=rpd msg=256k1.msg

 

Note The threads utility for the UNIX platform, i.e. the threads.sh command should be run from the Docserve directory.

INI Options

Change the priority value to DEBUG for the com.docucorp.test.threads category in the logclientconf.xml file so the utility can output the location of any files it receives from Docupresentment during testing.