The stresstest tool can be used to run performance tests. There are currently test suites available for running stress tests for time-stamping, document signing, and document validation. For more information, see Test Suites.

Tests can be run with a varying number of concurrent threads to simulate multiple concurrent incoming connections.

Run stresstest from SIGNSERVER_HOME using the following command:

bin/stresstest
BASH


Usage

stresstest <options>
Performance testing tool
 -continueonfailure     When this option is specified the test will
                        continue running if a request fails. Failed
                        requests will not be considered for the
                        calculation of the total number of requests and
                        response times. The total number of failed
                        requests will presented in the statistics.

 -data <arg>            Input data to be used with the
                        DocumentSigner/Validator1 testsuites using an
                        XMLSigner.
 -hashalgorithm <arg>   Optional. For setting the hash algorithm in 
						timestamp stuites.Default for TimeStamp1 = SHA1 and
      					TimeStamp2 = SHA256.     
 -infile <arg>          Input file used for DocumentSigner/Validator1
                        testsuites.
 -maxwaittime <arg>     Maximum number of milliseconds for a thread to
                        wait until issuing the next time stamp.
                        Default=100
 -processurl <arg>      URL to process servlet (for the
                        DocumentSigner/Validator1 test suites).
 -requestcertificate	Optional. For request certificate from the TSA 
						in the timestamp testsuite.
 -statoutputdir <arg>   Optional. Directory to output statistics to. If
                        set, each thread creates a file in this directory
                        to output its response times to. The directory
                        must exist.
 -testsuite <arg>       Test suite to run. Any of [TimeStamp1, TimeStamp2,
                        DocumentSigner1, DocumentValidator1].
 -threads <arg>         Number of threads requesting time stamps.
 -timelimit <arg>       Optional. Only run for the specified time (in
                        milliseconds).
 -tsaurl <arg>          URL to timestamp worker to use.
 -userprefix <arg>      Prefix for usernames.
 -usersuffixmax <arg>   Highest suffix for usernames in form of an integer
                        value (inclusive).
 -usersuffixmin <arg>   Lowest suffix for usernames in form of an integer
                        value (inclusive).
 -warmuptime <arg>      Don't count number of signings and response times
                        until after this time (in milliseconds). Default=0
                        (no warmup time).
 -worker <arg>          Worker name or ID to use (with the
                        DocumentSigner/Validator1 test suites).
 -workerurl <arg>       URL to worker servlet (for the
                        DocumentSigner/Validator1 test suites).
 
Sample usages:
a) stresstest -testsuite TimeStamp2 -threads 4 -tsaurl
http://localhost:8080/signserver/tsa?workerId=1 -hashalgorithm SHA384
b) stresstest -testsuite TimeStamp1 -threads 4 -maxwaittime 100
-statoutputdir ./statistics/ -tsaurl
http://localhost:8080/signserver/tsa?workerId=1
c) stresstest -testsuite DocumentSigner1 -threads 4 -processurl
http://localhost:8080/signserver/process -worker PDFSigner -infile
test.pdf
d) stresstest -testsuite DocumentSigner1 -threads 4 -processurl
http://localhost:8080/signserver/process -worker XMLSigner -data "<root/>"
e) stresstest -testsuite DocumentSigner1 -threads 4 -processurl
http://localhost:8080/signserver/process -worker XMLSigner -data "<root/>"
-userprefix user -usersuffixmin 1 -usersuffixmax 50
f) stresstest -testsuite DocumentValidator1 -threads 4 -processurl
http://localhost:8080/signserver/process -worker DemoXMLValidator -infile
signed.xml
CODE

When finished, that is once the time limit expires or you stop the process by pressing Ctrl+C, a statistic overview is printed containing the number of signings, and statistics (average, minimum, and maximum) for the response times.

Test Suites

There following test suites are available for running stress tests for time-stamping, document signing, and document validation:

TimeStamp1Sends time-stamp requests using a dummy hash. The default is SHA-1 hash.
TimeStmap2Sends time-stamp requests using a dummy hash. The default is SHA-256 hash.
DocumentSigner1Sends document signing requests.
DocumentValidator1Sends document validation requests.