Stresstest CLI

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

Usage
stresstest <options>
Performance testing tool
-data <arg> Input data to be used with the
DocumentSigner/Validator1 testsuites using an
XMLSigner.
-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).
-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
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

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:

TimeStamp1

Sends time-stamp requests using a dummy SHA-1 hash.

TimeStmap2

Sends time-stamp requests using a dummy SHA-256 hash.

DocumentSigner1

Sends document signing requests.

DocumentValidator1

Sends document validation requests.