03 December 2007 - 2.0-beta2 |
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:
switch | description |
---|---|
e | The endpoint to use when invoking test-requests, overrides the endpoint set in the project file |
h | The host:port to use when invoking test-requests, overrides only the host part of the endpoint set in the project file |
s | The TestSuite to run, used to narrow down the tests to run |
c | The TestCase to run, used to narrow down the tests to run |
l | The LoadTest to run, used to narrow down which LoadTests to run |
m | Overrides the limit value set for the specified LoadTest(s) |
u | The username to use in any authentications, overrides any username set for any TestRequests |
p | The password to use in any authentications, overrides any password set for any TestRequests |
d | The domain to use in any authentications, overrides any domain set for any TestRequests |
r | Turns on exporting of a LoadTest statistics summary report (see below) |
f | Specifies the root folder to which test results should be exported (see below) |
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.
For getting started with the command-line LoadTestRunner, soapUI includes a "Launch Dialog" action available from Project/LoadTest popup menus:
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:
The output contains the actual command-line command used for launching the runner, which can easily be copy/pasted for external reuse
The SoapUILoadTestRunner has limited reporting functionalities, 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