...
When you run Load Test in command line mode, Load Test uses the license configured in the GUI mode by default. You can also dynamically request a license from a Parasoft License Server with the -licenseserverlicenseServer
option. Specify the host and port base URL of the License Server and use the -licenseVus
option option to specify the number of virtual users allowed by the license. Note: if the port is not specified in the base URL, the default ports (80 for HTTP and 443 for HTTPS) are used.
Code Block | ||||
---|---|---|---|---|
| ||||
lt.exe -cmd -run <PATH_TO_YOUR_SCRIPT> -licenseserver <HOST>:<PORT>licenseServer <BASE_URL> -licenseVus <INTEGER> // WINDOWS ./loadtest licenseUsername username -licensePassword password -licenseVus <INTEGER> |
Code Block | ||||
---|---|---|---|---|
| ||||
./loadtest -cmd -run <PATH_TO_YOUR_SCRIPT> -licenseserver <HOST>:<PORT>licenseServer <BASE_URL> -licenseVuslicenseUsername <INTEGER>username //-licensePassword Linuxpassword and-licenseVus macOS<INTEGER> |
Examples
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| -licenseserver LicenseServerHost:2002 -licenseVus 100 // Requests a
|
|
| |||||||
-licenseServer https://licenseserver.mydomain.com -licenseUsername username -licensePassword abc0123456789def -licenseVus 100 |
Code Block | ||||
---|---|---|---|---|
| ||||
-licenseServer http://licenseserver:8080 -licenseUsername username -licensePassword password -licenseVus Unlimited |
Code Block | ||||
---|---|---|---|---|
| ||||
-licenseServer https://licenseserver.mydomain.com:8443 license -licenseserver LicenseServerHost:2002 -licenseVus Unlimited // Requests an Unlimited VU Load Test license -licenseserver LicenseServerHost:2002 // Requests basic 5-VU Load Test license |
Running Load Test on Remote Machines
...
Starting Load Test in Server Mode
Use the -loadtestserver
flag flag and specify the port number to enable the Load Test to run remotely. The port number is the local machinesmachine's port on which the server is listening. If no port is specified, the default port of 8189 is used.
Code Block | ||||
---|---|---|---|---|
| ||||
lt -loadtestserver [PORT] |
Code Block | ||||
---|---|---|---|---|
| ||||
<PORT> // WINDOWS ./loadtest -loadtestserver <PORT> // Linux and macOS[PORT] |
Configuring a Remote Project
...
The machine that runs in GUI mode and provides the interface for controling controlling the load test is the Load Test controller machine. The controller can communicate with a Load Test server machine located on a different network if the network equipment that bridges these networks allows communication on the port that the Load Test server machine is listening on.
...
Scroll Table Layout | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Option | Description |
---|---|
-cmd | Starts Load Test in command line mode. Required to run Load Test locally. |
-run | Specifies the Load Test script to run. Required to run Load Test locally. |
-licenseserver <HOST>:<PORT>
-help | Shows help information. Does not run testing. |
-licenseServer <BASE_URL> | Specifies the base URL for the Parasoft License Server |
. By default, Load Test requests a license from the server configured in the GUI, but this option enables you to dynamically request a license. Optional. | |
-licenseUsername <USERNAME> | Specifies the username associated with the license on the Parasoft License Server. If this argument is not specified, no authentication is used. Optional. |
-licensePassword <PASSWORD/ENCODED_PASSWORD> | Specifies the password or encoded password associated with the license on the Parasoft License Server. Passwords may be encoded using the soatestcli -encodepass command line option. If this argument is not specified, an empty password is used for authentication. Optional. |
-licenseVus <VALUE> | Specifies the number of virtual users allowed by the license requested from the server specified with the - |
licenseServer option. You can specify an integer value or unlimited for unlimited virtual users licenses. |
|
| Starts the Load Test Server on the |
default port 8189 unless another port is specified. To start the Load Test Server on port 8999, for example, you would specify the port number in the command line argument such as:
| |
-password <LONG_PASSWORD_STRING> | Specifies a node-locked license to pass to Load Test. |
-J<JVM_OPTION> | Specifies additional JVM options to pass to the Load Test JVM. (Note that there is no space between the Examples:
|
Load Test Script Commands
Scroll Table Layout | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Command | Option & option arguments | Description | ||
---|---|---|---|---|
var | Format: Declares a variable name and assigns it a value. Use ${variable_name} syntax to get the variable value. | |||
open | Format: Opens the specified project in Load Test. After a project is loaded, use the loadtest command. | |||
loadtest | Format: Runs a test suite load test using the specified scenario and options. See the rows below for details. | |||
-localSettings settings path_to_local_settings_file | Specifies the path to the local settings file, which contains configuration and preferences parameters (see Local Settings Files). | |||
-env environment_name | Sets the active environment. Environments are a part of the SOAtest project that are used by the Load Test. | |||
-minutes number | Specifies the test duration in minutes. If you specify a test duration in this command, it will override the test duration specified in the scenario. | |||
-vus number | Sets the number of virtual users for each machine in the load test configuration to the given Number. The execution mode is switched to "Weighted Profiles" mode and each machine in the load test configuration is configured to run a steady load with the specified number of virtual users. | |||
-hps number | Sets the number of hits per second for each machine in the load test configuration to the given Number. The execution mode is switched to "Weighted Profiles" mode and each machine in the load test configuration is configured to run a steady load with the specified number of hits per second. | |||
-teamServer path_inside_team_server | Sends the necessary reports to the Team Server under the specified path. Uses the Team Server that is speci-fied in the local settings file. If no local settings are specified, uses the Team Server specified in the Load Test preferences. See Load Test Continuum for more details and examples. -tcm path_inside_team_ser ver is deprecated but supported. | -report path_to_report_file | Specifies that you want to create a binary report with the given name | |
-html html_directory | Specifies that you want to create an HTML report with the given name in the specified directory. | |||
-allReports reportsPath | Specifies that you want to create a binary, XML and HTML report under the given directory path. | |||
-trimReportSeconds headSeconds tailSeconds | Specifies the duration (in seconds) to be trimmed from the beginning and the end of the report*. The seconds values must be non-negative integers. If the sum of the headSeconds and tailSeconds values is greater than the duration of the report, the trim operation will not be applied. | |||
-trimReportPercentage headPercentage tailPercentage | Specifies the duration (in a percentage relative to the duration of the report) to be trimmed from the beginning and the end of the report*. The percentages must be non-negative integers. If the sum of the headPercentage and tailPercentage is equal to or greater than 100, the trim operation will not be applied. |
*Load Test report data is collected and saved in approximately 3 second intervals. The trimReport…commands trimReport commands will discard all report collection points that fall into the specified trim intervals. Because the times of the report collection points and the specified trim values may not match, the actual duration trimmed from the beginning and end of the report may (and in most cases will) exceed the duration specified in the command line. The excess value trimmed from the head and the tail of the report will not exceed the duration of the data collection interval. For more details on how report fragments are saved, see Understanding Report Interval Selection.
...
Settings Files
Anchor | ||||
---|---|---|---|---|
|
Local settings Settings files can control various Load Test options. You can create different local settings files for different projects, then use the the -localSettingssettings
script option to indicate which file should be used for the current command line test.
...
Each name/value pair must be on a separate line. Use the hash “#” symbol to comment the name/value entries.
Sample
A sample local settings file may contain:
Code Block |
---|
# This is a commment
echo=false
team.server.host=localhost
team.server.port=18888
team.server.user=
team.server.password= |
Available Settings
Setting | Description | ||||||
---|---|---|---|---|---|---|---|
echo=true|false | If “true” Load Test will echo the settings to the console. Default state is true. If this setting is used, it must be the first entry in the local settings file. | ||||||
| Turns on console logging in command line mode. See Console Logging section below. Default is disabled. | ||||||
team.server.host=host_name | Team Server host name. If this setting is not specified, the Load Test Preferences Team Server setting will be used. | ||||||
team.server.port=port_number | Team Server port number. If this setting is not specified, the Load Test Preferences Team Server setting will be used. | ||||||
team.server.user=user | Team Server user name. Leave this setting empty to specify empty user name. If this setting is not specified, the Load Test Preferences Team Server setting will be used. This Team Server parameter is optional; it is not required with most configurations. | ||||||
team.server.password=password | Team Server password. Leave this setting empty to specify empty password. If this setting is not specified, the Load Test Preferences Team Server setting will be used. This Team Server parameter is optional; it is not required with most configurations. |
Console Logging
Anchor | ||||
---|---|---|---|---|
|
Console logging provides load test status information in command line mode as the tests are running. When console logging is enabled (see the console.log=enable
local setting setting), the application prints the main load test run time parameters in the console. Load test status is printed in one line every 30 seconds. It contains the following information:
...