The included loadtestrunner.bat/.sh filecan 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, but be careful not to run LoadTests with an indefinite test limit.
The following arguments are available:
- 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)
- n : Overrides the thread-count 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)
- w : Sets the WSS password type, either Text or Digest
- t : Sets the soapui-settings.xml file to use, required if you have custom proxy, ssl, http, etc settingx : Sets project password for decryption if project is encrypted
- x : Sets project password for decryption if project is encrypted
- v : Sets password for soapui-settings.xml file
- D : Sets system property with name=value
- G : Sets global property with name=value
- P : Sets project property with name=value
- S : Saves the project after running the tests
- R : Selects 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)
- F : Sets 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)
- o : Opens the generated report in a browser (soapUI Pro only)
- E : Sets which environment to use (soapUI Pro only)
So for example running
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.
Launching from within soapUI
For getting started with the command line testrunner, soapUI includes a "Launch TestRunner" action available from Project, TestSuite or TestCase popup menus, which launches the bundled command-line tools from inside soapUI. (The IDE plugins do not include these runners, you will need to download/install soapUI seperately and point the "TestRunner Path" option in this dialog to the install directory). Opening the dialog from the LoadTest popup menu gives the following:

Here we've entered some basic values, after pressing the "Launch" button the LoadTest starts from the command line and eventually we get:

While running we can see the ongoing output as shown in the dialog above; the loadtestrunner continuously displays its progress (from 0 to 1) and the number of current threads, ie a row ending with ".. progress: 0.72, 6" would mean that the test has come 72% and is currently running with 6 threads.
Just as for the Functional TestCase runner we can scroll up in the log and see the actual command issued at the command-line, making it easy for us to reuse this for automation purposes:




