1. Load test client Scripts used

The load generation scripts can be found in the "samples/bin" directory, and primarily includes two scripts. The "smoketest.sh" could be used to ensure that the Test suite and all test cases are properly setup before a complete execution run - and thus includes a test for each scenario. The "loadtest.sh" includes the full list of test scenarios.

username@host:~/java/ultraesb-1.7.0/samples/bin$ cat smoketest.sh
#/bin/sh

# Directory which contains the soa-toolbox-x.x.x.jar
RUN_DIR=../../lib/samples
# Script to loop test
LOOP=../../samples/bin/loop.sh
# Sample requests directory
REQ_DIR=../../samples/resources/requests
# Depends on the ESB
SERVICE_PREFIX=$1

cd $RUN_DIR
echo Executing in directory $PWD

echo "Warm-up..."
$LOOP 1 $REQ_DIR/1K_buyStocks.xml 1000 20 urn:buyStocks.2 $SERVICE_PREFIX/DirectProxy
$LOOP 1 $REQ_DIR/1K_buyStocks.xml 1000 20 urn:buyStocks.2 $SERVICE_PREFIX/CBRProxy
$LOOP 1 $REQ_DIR/1K_buyStocks.xml 1000 20 urn:buyStocks.2 $SERVICE_PREFIX/CBRSOAPHeaderProxy
$LOOP 1 $REQ_DIR/1K_buyStocks.xml 1000 20 urn:buyStocks.2 $SERVICE_PREFIX/CBRTransportHeaderProxy
$LOOP 1 $REQ_DIR/1K_buyStocks.xml 1000 20 urn:buyStocks.2 $SERVICE_PREFIX/XSLTProxy
$LOOP 1 $REQ_DIR/1K_buyStocks_secure.xml 1000 20 urn:buyStocks.2 $SERVICE_PREFIX/SecureProxy

echo "Completed"

When executing either of the scripts loadtest.sh or smoketest.sh, the prefix for the proxy services hosted on the selected ESB must be passed as a parameter. The load test would then iterate the scenario a number of times (default 1) using the script "loop.sh" (See lines 17-22 above). This would fire off a request of the form shown below, invoking the ApacheBench style high performance HTTP/S client.

The "-p" specifies the request payload filename and the "-n" parameter specifies the number of requests, while "-c" specifies the concurrency. The socket timeout in ms is specified by "-t" and "-k" selects keepalive connections. The "-T" specifies the content type, and the "-H" adds a custom HTTP header. These options are the same or similar to the ApacheBench options.

java -Xms512M -Xmx512M -server -XX:+UseParallelGC -cp $ULTRA_CLASSPATH org.adroitlogic.toolbox.javabench.JavaBench -p $file -n $n -c $c -k -t 180000 -H "SOAPAction: \"$action\"","routing: xadmin;server1;community#1.0##" -T "text/xml; charset=UTF-8" $url

To use the load test client directly, use the JavaBench tab of the graphical ToolBox test kit, or execute JavaBench from the command line as follows:

user@host:~/java/ultraesb-1.7.0/lib/samples$ java -Xms512M -Xmx512M -server -XX:+UseParallelGC -cp soa-toolbox-1.6.0.jar:../commons-cli-1.2.jar:../log4j-1.2.15.jar  org.adroitlogic.toolbox.javabench.JavaBench
usage: SOA-Toolbox/1.5.0 (c) 2010 AdroitLogic. All Rights Reserved
                         JavaBench [options]
                         http[s]://hostname[:port]/path
 -c <concurrency>      Concurrency while performing the benchmarking
                       session. The default is to just use a single
                       thread/client.
 -g                    Accept GZip. Default is false
 -H <header>           Add arbitrary header line, eg. 'Accept-Encoding:
                       gzip' inserted after all normal header lines.
                       (repeatable as -H "h1: v1","h2: v2" etc)
 -h                    Display usage information.
 -k                    Enable the HTTP KeepAlive feature, i.e., perform
                       multiple requests within one HTTP session. Default
                       is no KeepAlive
 -m <HTTP method>      HTTP Method. Default is POST. Possible options are
                       GET, POST, PUT, DELETE, HEAD, OPTIONS, TRACE
 -n <requests>         Number of requests to perform for the benchmarking
                       session. The default is to just perform a single
                       request which usually leads to non-representative
                       benchmarking results.
 -o                    Use HTTP/S 1.0
 -p <POST-postFile>    File containing data to POST.
 -T <content-type>     Content-type header to use for POST data.
 -t <socket-Timeout>   Client side socket timeout (in ms) - default 60
                       Secs
 -u                    Chunk entity. Default is false
 -v <verbosity>        Set verbosity level - 4 and above prints response
                       content, 3 and above prints information on headers,
                       2 and above prints response codes (404, 200, etc.),
                       1 and above prints warnings and info.
 -x                    Use Expect-Continue. Default is false

2. Sample requests used

The sample requests used during the performance test execution maybe found in the "samples/resources/requests" subdirectory of the installation.

3. Proxy Service WSDL

The WSDL used by the proxy service exposed over the ESB can be found as "samples/resources/perf/ProxyWSDL-embedded.wsdl"

4. The XSL stylesheets

The XSL style sheets used in scenario #3 could be found in the "samples/resources/perf" subdirectory as "transform_env_reverse.xslt" and "transform_env.xslt"

5. The WS-Security Keystore

This keystore is the standard WS-Security keystore used for WS-Security interoperability testing and could be found as "samples/resources/perf/store.jks". The keystore password and the passwords for the alias "bob" and "alice" is "password"

Back to Home Page