09 July 2009 - 3.0 user guide eclipse intellij netbeans maven download nightly forum bugs blog sf.net eviware


Eviware Logo

SoapUILoadTestRunner

The SoapUILoadTestRunner can be used to run LoadTests from the command line, which can be used for surveillance testing and maximizing local testing. The runner will run each specified LoadTest in turn, be careful not to run LoadTests with an indefinite test limit.

The runner is defined in the com.eviware.soapui.tools.SoapUILoadTestRunner class and takes the path to the soapUI project file containing the LoadTests to run and a number of options:

switchdescription
eThe endpoint to use when invoking test requests, overrides the endpoint set in the project file
hThe host:port to use when invoking test requests, overrides only the host part of the endpoint set in the project file
sThe TestSuite to run, used to narrow down the tests to run
cThe TestCase to run, used to narrow down the tests to run
lThe LoadTest to run, used to narrow down which LoadTests to run
mOverrides the limit value set for the specified LoadTest(s)
nOverrides the thread-count value set for the specified LoadTest(s)
uThe username to use in any authentications, overrides any username set for any TestRequests
pThe password to use in any authentications, overrides any password set for any TestRequests
dThe domain to use in any authentications, overrides any domain set for any TestRequests
rTurns on exporting of a LoadTest statistics summary report (see below)
fSpecifies the root folder to which test results should be exported (see below)
wSets the WSS password type, either Text or Digest
tSets the soapui-settings.xml file to use
xSets project password for decryption if project is encrypted
vSets password for soapui-settings.xml file
DSets system property with name=value
GSets global property with name=value
PSets project property with name=value
SSaves the project after running the tests
RSelects which report to generate for the executed LoadTest(s), the report is saved as specified with the -F option to the folder specified with the -f option. (soapUI Pro only)
FSets the format of the report specified with the -R option, for Printable reports this is one of PDF, XLS, HTML, RTF, CSV, TXT, and XML. For Data Export this is either XML or CSV (soapUI Pro only)

The distribution contains a loadtestrunner.bat script for running tests from within the bin directory, for example;

loadtestrunner.bat -ehttp://localhost:8080/services/MyService c:\projects\my-soapui-project.xml 

will run all the LoadTests defined in the my-soapui-project.xml file against the specified service-endpoint.

Launch Load Test Dialog

For getting started with the command-line LoadTestRunner, soapUI includes a "Launch LoadTestRunner" action available from Project/LoadTest popup menus which can be used to launch the command-line runner from inside soapUI. (The IDE plugins do not include the command-line runners, you will need to download/install soapUI seperately and point the "TestRunner Path" option in this dialog to the install directory). The dialog looks as follows:

Load Test Runner Dialog

The options available include those described above and also add options to set if the project should be saved, the path to the runner (leave empty for same as installation), etc. When launching the specified LoadTestRunner will be launched from the command-line as configured and the output can be followed:

Load Test Runner Output

The output contains the actual command line command used for launching the runner, which can easily be copied or pasted for external reuse

Reporting and Exporting load tests

The SoapUILoadTestRunner has limited reporting functionality, it will during execution print diagnostic and progress information and if the -r switch was specified write the LoadTest statistics and LoadTest Log to a file after execution. Error Result in the LoadTest Log will be exported likewise, in the same manner as for the TestCase runner.

loadtestrunner -stest -ctestcase4 -l"LoadTest 1" -r "C:\Documents and Settings\ole.matzura\My Documents\jbossws-soapui-project.xml"

produced the following output:

SoapUI 1.5beta2 LoadTestRunner
15:31:50,397 INFO  [SoapUILoadTestRunner] setting projectFile to [C:\Documents and Settings\ole.matzura\
 My Documents\jbossws-soapui-project.xml]
15:31:50,517 INFO  [SoapUILoadTestRunner] setting testSuite to [test]
15:31:50,517 INFO  [SoapUILoadTestRunner] setting testCase to [testcase3]
15:31:52,901 INFO  [WsdlProject] Loaded project from [C:\Documents and Settings\ole.matzura\My Documents\
 jbossws-soapui-project.xml]
15:31:59,941 INFO  [SoapUILoadTestRunner] Skipping testcase [testing], filter is [testcase3]
15:31:59,941 INFO  [SoapUILoadTestRunner] Skipping testcase [testcase2], filter is [testcase3]
15:31:59,941 INFO  [SoapUILoadTestRunner] Running LoadTest [LoadTest1]
15:32:00,141 INFO  [SoapUILoadTestRunner] LoadTest [LoadTest1] progress: 0.0025
15:32:01,153 INFO  [SoapUILoadTestRunner] LoadTest [LoadTest1] progress: 0.019533332
15:32:02,154 INFO  [SoapUILoadTestRunner] LoadTest [LoadTest1] progress: 0.036383335
15:32:03,155 INFO  [SoapUILoadTestRunner] LoadTest [LoadTest1] progress: 0.053066667
..etc..
15:32:57,944 INFO  [SoapUILoadTestRunner] LoadTest [LoadTest1] progress: 0.9662167
15:32:58,956 INFO  [SoapUILoadTestRunner] LoadTest [LoadTest1] progress: 0.9830833
15:32:59,977 INFO  [SoapUILoadTestRunner] LoadTest [LoadTest1] progress: 1.0001
15:33:00,979 INFO  [SoapUILoadTestRunner] LoadTest [LoadTest1] finished with status FINISHED
15:33:00,979 INFO  [SoapUILoadTestRunner] Exporting log and statistics for LoadTest [LoadTest1]
15:33:01,039 INFO  [SoapUILoadTestRunner] Exported 2 log items to [LoadTest 1-log.txt]
15:33:01,039 INFO  [SoapUILoadTestRunner] Exported 0 error results
15:33:01,119 INFO  [SoapUILoadTestRunner] Exported 2 statistics to [LoadTest 1-statistics.txt]
15:33:01,119 INFO  [SoapUILoadTestRunner] Skipping testcase [Copy of Copy of testing], filter is [testcase3]
15:33:01,119 INFO  [SoapUILoadTestRunner] soapui suite [test] finished in 61178ms

The exported statistics file is the same as exported from within the LoadTest Editor and looks as follows:

Request Step,min,max,avg,last,cnt,tps,bytes,bps,err
request step,1,407,17.63,26,11591,283.49,5192768,86696,0
Total:,1,407,17.63,26,11591,283.49,5192768,86696,0


Next: SoapUIMockRunner for Web Service Simulation