...
Invoke Load Test from the command line to run the script:
Code Block | ||
---|---|---|
| ||
lt.exe -cmd -run <PATH_TO_YOUR_SCRIPT> // WINDOWSWindows ./loadtest loadtest -cmd -run <PATH_TO_YOUR_SCRIPT> // Linux and macOS |
The -cmd
argument starts Load Test in command line mode. The -run
argument executes the specified Load Test script. Both arguments are required to run a script from the command line.
Code Block | language | java
---|
lt.exe -cmd -run <PATH_TO_YOUR_SCRIPT> // WINDOWS ./loadtest -cmd -run <PATH_TO_YOUR_SCRIPT> // Linux and macOS |
...
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 -licenseServer
option. Specify the base URL of the License Server and use the -licenseVus
option to specify the number of virtual users allowed by the license. Note that HTTP connections are not supported.
Code Block | language | java|
---|---|---|
| ||
lt.exe -cmd -run <PATH_TO_YOUR_SCRIPT> -licenseServer <BASE_URL> -licenseUsername username -licensePassword password -licenseVus <INTEGER> |
Code Block | ||||
---|---|---|---|---|
| ||||
./loadtest -cmd -run <PATH_TO_YOUR_SCRIPT> -licenseServer <BASE_URL> -licenseUsername username -licensePassword password -licenseVus <INTEGER> |
Examples
Code Block | language | text|
---|---|---|
| ||
-licenseServer https://licenseserver.mydomain.com -licenseUsername username -licensePassword abc0123456789def -licenseVus 100 |
Code Block | language | text|
---|---|---|
| ||
-licenseServer https://licenseserver.mydomain.com:8443 -licenseUsername username -licensePassword password -licenseVus Unlimited |
Code Block | ||||
---|---|---|---|---|
| ||||
-licenseServer https://licenseserver.mydomain.com:8443 |
...
Use the -loadtestserver
flag and specify the port number to enable the Load Test to run remotely. The port number is the local machine'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 | language | java|
---|---|---|
| ||
./loadtest -loadtestserver [PORT] |
...
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. | |
-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 theencrypted with AES 256-bit encryption 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. | |
-reserialize | Specifies a file path to Load Test assets that you want to reserialize into a different file format. See Reserializing Assets for more information. | |
-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
...
Code Block |
---|
2011.04.21 17:54:56 MDT | 53% complete | 32/60 seconds | passed 245/failed 0 | avg. VUs 4 |avg. HPS 8 |
Reserializing Assets
Anchor | ||||
---|---|---|---|---|
|
You can reserialize Load Test assets to a new file format from the command line. To do so, follow this workflow:
- Open a SOAtest workspace that has the project file format you want to reserialize your assets to. The project file format of the workspace isdefined in the workspace's Misc preferences.
- Close SOAtest.
- Run Load Test from the command line with the
-reserialize
option, specifying the directories containing the assets you want to reserialize.
The -reserialize
option is used to specify a list of directories containing Load Test assets to reserialize. It will automatically use the project file format of the SOAtest workspace most recently opened. This option takes a single argument with a list of file system paths. To specify multiple paths, use the default path-separator character for your OS (semicolon for Windows or colon for Linux/Mac). The paths you specify do not have to be in the SOAtest workspace providing the project file format, but matching files will be reserialized to that workspace's default format.
Example:
Code Block |
---|
lt.exe -cmd -reserialize <PATH_TO_ASSETS_FOLDER_1>;<PATH_TO_ASSETS_FOLDER_2> // Windows
./loadtest -cmd -reserialize <PATH_TO_ASSETS_FOLDER_1>:<PATH_TO_ASSETS_FOLDER_2> // Linux and macOS |
This option will reserialize .lt, .ltp, .metric, .ms, and .rpt files. However, .rpt files are always serialized as binary, not to the configured project file format.