This appendix lists the parameters for running Oracle Load Testing scenarios from the command line.
To run Oracle Load Testing scenarios from the command line, type:
[OATS Install Dir]/jdk/bin/java -jar OLTCommandLine.jar
-command
-option=value -option=value
[...]
-
option
may consist of any number of Oracle Load Testing command line settings. Required arguments are specified based upon the command and are case-insensitive unless otherwise specified.
This section describes how to use the command line settings.
Command line settings may be specified using the following format:
OLTCommandLine.jar
-
command
-
option=value
[...]
Example 1: Run a scenario and log the results to a file.
cd C:/[OATS Install Dir]/lib [OATS Install Dir]/jdk/bin/java -jar OLTCommandLine.jar -run -scenarioFile="C:/OracleATS/OFT/Simple Scenario.scn" -OLTServer=localhost:8088 -user=oats -password=mypass123 -log=C:/OracleATS/OFT/mylog.log
Example 2: Run a scenario with rampup of 2 Users every 30 seconds.
cd C:/[OATS Install Dir]/lib [OATS Install Dir]/jdk/bin/java -jar OLTCommandLine.jar -run -scenarioFile="c:/oracleats/OFT/Simple Scenario.scn" -session=TestSession -OLTServer=localhost:8088 -user=oats -password=mypass123 -iteration=1 -groupdatanumber=2 -ramptriggerafterseconds=30
Example 3: Run a scenario with rampup of 2 Users every 2 iterations.
cd C:/[OATS Install Dir]/lib [OATS Install Dir]/jdk/bin/java -jar OLTCommandLine.jar -run -scenarioFile="c:/oracleats/OFT/Simple Scenario.scn" -session=TestSession -OLTServer=localhost:8088 -user=oats -password=mypass123 -groupdatanumber=2 -ramptriggerafteriterations=2
Example 4: Get the Oracle Load Testing version.
cd C:/[OATS Install Dir]/lib [OATS Install Dir]/jdk/bin/java -jar OLTCommandLine.jar -version -OLTServer=localhost:8088 -user=oats -password=mypass123
Example 5: Stop Session0001.
cd C:/[OATS Install Dir]/lib [OATS Install Dir]/jdk/bin/java -jar OLTCommandLine.jar -stop -session="Session0001" -OLTServer=localhost:8088 -user=oats -password=mypass123
Example 6: Generate Session Report.
cd C:/[OATS Install Dir]/lib [OATS Install Dir]/jdk/bin/java -jar OLTCommandLine.jar -report -OLTServer=localhost:8088 -user=oats -password=mypass123 -session=mysession001 -thinkTime=false -filterDateMin="3/19/2013 08:00:00" -filterDateMax="3/19/2013 15:30:00" -log= C:/OracleATS/OFT/Default/mylog.log -localFile=c:/myreport.htm
If many settings are required, use the -property
setting to specify a file containing a larger number of properties. See the -property
setting in the Run Settings for additional information.
This section lists the command line settings that can be used with Oracle Load Testing.
The following table lists commands used for Oracle Load Testing command line execution. The options include the General Settings and any command-specific additional options.
Command | Description |
---|---|
-addagent -[ options ] |
Adds an Oracle Load Testing agent using the specified options. You can verify that the agent is been added to the systems manager by selecting Systems from the Manage menu then selecting VU Agent Systems in the Oracle Load Testing UI. See the AddAgent Settings for additional options.
Example usage:
|
-addagentgroup -[ options ] |
Adds an Oracle Load Testing agent group using the specified options. You can verify that the agent group has been added to the systems manager by selecting Systems from the Manage menu then selecting VU Agent Systems in the Oracle Load Testing UI. See the AddAgentGroup Settings for additional options.
Example usage:
|
-getdbconfig -[ options ] |
Gets the database configuration information. username is the db username ('sysman' by default) & password is the database password. OLTServer may be any machine that has the Oracle Load Testing controller installed. This command returns the currently configured database-related information in XML format, for example:
Example usage:
|
-export -[ options ] |
Exports the specified scenario to a scenario .scnzip file. See the Export and Import Settings for additional options.
Example usage:
|
-import -[ options ] |
Imports the specified scenario .scnzip file. See the Export and Import Settings for additional options.
Example usage:
|
-importandrun -[ options ] |
Imports the specified scenario .scnzip file and runs the scenario.
Example usage:
|
-report -[ options ] |
Generates a session report for the specified session. See the Report Settings for additional options.
Example usage:
|
-run -[ options ] |
Runs the selected scenario until the command line stop command is issued, the specified command line stopat condition is reached, or the stop conditions specified in the scenario are reached. See the Run Settings for additional options.
Example usage:
|
-status -[ options ] |
Returns the current Oracle Load Testing session status in the following format:
Example usage:
|
-stop -[ options ] |
Shuts down the specified session. The Stop command is not required if the specified Scenario being run has a Stop condition of some defined time or number of iterations saved in the Autopilot settings. You can not use both "-Run" and "-Stop" in the same command. See the Stop Settings for additional options.
Example usage:
|
-version -[ options ] |
Gets the current Oracle Load Testing version in XML format, for example:
Example usage:
|
The following table lists the command line settings used for all commands.
Setting | Description |
---|---|
-OLTServer= servername : port |
Specify the name and port number of the Oracle Load Testing server. The default port is 8088.
Example usage:
|
-user=oats |
Specify the user name for the Oracle Load Testing server. The required username is "oats".
Example usage:
|
-password= password |
Specify the password. The password is the password defined during the Oracle Application Testing Suite installation process.
Example usage:
|
The following table lists the AddAgent command line settings. These settings are used in addition to the General Settings.
Setting | Description |
---|---|
-agentname= agentname |
Specify the name of the Oracle Load Testing agent.
Example usage:
|
-agenthostnameorip= nameorIp |
Specify the host name or IP address of the Oracle Load Testing agent.
Example usage:
|
-agentpassword= password |
Specify the password to use for the Oracle Load Testing agent.
Example usage:
|
The following table lists the AddAgentGroup command line settings. These settings are used in addition to the General Settings.
Setting | Description |
---|---|
-agentgroupname= name |
Specify a name for the Oracle Load Testing agent group.
Example usage:
|
-systems= name1 ; name2 ; name_n |
Specify the names of the Oracle Load Testing agents. Agents names are seperated by semi-colon (;) in the -systems option.
Example usage:
|
The following table lists the import and export command line settings. These settings are used in addition to the General Settings.
Setting | Description |
---|---|
-localFile= localFile |
(Export only.) Specify a name to use for the exported Oracle Load Testing scenario file.
Example usage:
|
-log= logfile |
Optional. Specify the path and file name of a log file.
Example usage:
|
-repository= repositoryName |
Specify a name for the Oracle Load Testing repository.
Example usage:
|
-scenarioFile= scenarioFile |
Specify the path and name of the Oracle Load Testing scenario (.scn) file to import or export.
Example usage:
|
-workspace= workspaceName |
Optional. Specify a name for an Oracle Load Testing workspace folder.
Example usage:
|
The following table lists the Report command line settings. These settings are used in addition to the General Settings.
Setting | Description |
---|---|
-localFile= localFile |
Specify a name to use for the generated Oracle Load Testing session report.
Example usage:
|
-log= logfile |
Optional. Specify the path and file name of a log file.
Example usage:
|
-session= sessionName |
Specify the name of the session to use to generate the report.
Example usage:
|
-thinkTime=true|false |
Optional. Specify if think times are included in the session report. When true , only Server Times are included in the report. When false , End-to-End Times are included in trhe report (includes "Think Times"). The default is true .
Example usage:
|
-filterDateMin= M/d/yyyy HH:mm:ss |
Optional. Specify the minimum date to use to filter the report data.
Example usage:
|
-filterDateMax= M/d/yyyy HH:mm:ss |
Optional. Specify the maximum date to use to filter the report data.
Example usage:
|
The following table lists the Report command line settings. These settings are used in addition to the General Settings.
Setting | Description |
---|---|
-property= propertyFile |
Specify the file path to a properties file listing only the command line -user and -password arguments in name=value pair format.
The format in the property file is:
For example:
Example usage: -property=c:/OLTRun.properties |
-scenarioFile= scenarioFile |
Specify the path and name of the Oracle Load Testing scenario (.scn) file to run.
Example usage:
|
-session= sessionName |
Optional. Specify a name to use for the Oracle Load Testing session. If not specified, a session name is automatically assigned. Session names that are automatically assigned can be located on the console or in the log file specified using the -log option.
Example usage:
|
-log= logfile |
Optional. Specify the path and file name of a log file.
Example usage:
|
-useCloud |
Required if using a Cloud agent. Indicates the Oracle Load Testing scenario will be run on an Oracle Enterprise Manager Cloud. Specify the additional required and optional cloud run settings.
Example usage:
|
-cloudEmHost= EM Host |
Required if using a Cloud agent. Specify the name of the Oracle Enterprise Manager Cloud host machine.
Example usage:
|
-cloudEmPort= EM Port |
Required if using a Cloud agent. Specify the port used for the Oracle Enterprise Manager Cloud.
Example usage:
|
-cloudEmUsername= EM Username |
Required if using a Cloud agent. Specify the user name used for the Oracle Enterprise Manager Cloud.
Example usage:
|
-cloudEmPassword= EM Password |
Required if using a Cloud agent. Specify the password used for the Oracle Enterprise Manager Cloud.
Example usage:
|
-cloudAssembly= Assembly Name |
Required if using a Cloud agent. Specify the assembly name used for the Oracle Enterprise Manager Cloud.
Example usage:
|
-cloudZone= Zone Name |
Required if using a Cloud agent. Specify the zone name used for the Oracle Enterprise Manager Cloud.
Example usage:
|
-cloudPlan= DeploymentPlan |
Required if using a Cloud agent. Specify the deployment plan used for the Oracle Enterprise Manager Cloud.
Example usage:
|
-cloudNetwork= Network Name |
Required if using a Cloud agent. Specify the network name used for the Oracle Enterprise Manager Cloud.
Example usage:
|
-cloudInitial= Initial Agent Count |
Optional if using a Cloud agent. Specify the initial agent count to use when running scenarios in the Oracle Enterprise Manager Cloud. The default is 3.
Example usage:
|
-cloudMinimum= Minimum Free Agent Count |
Optional if using a Cloud agent. Specify the minimum free agent count to use when running scenarios in the Oracle Enterprise Manager Cloud. The default is 0.
Example usage:
|
-cloudMaximum= Maximum Free Agent Count |
Optional if using a Cloud agent. Specify the maximum free agent count to use when running scenarios in the Oracle Enterprise Manager Cloud. The default is 10.
Example usage:
|
-cloudIncrement= Cloud Agent Increment |
Optional if using a Cloud agent. Specify the agent increment to use when running scenarios in the Oracle Enterprise Manager Cloud. The default is 2.
Example usage:
|
-cloudPrefix= Agent Prefix |
Optional if using a Cloud agent. Specify the agent prefix string to use when running scenarios in the Oracle Enterprise Manager Cloud. The default is "OLT".
Example usage:
|
-cloudSystemCpuMax= System CPU threshold |
Optional if using a Cloud agent. Specify the percentage of CPU to use as the agent threshold when running scenarios in the Oracle Enterprise Manager Cloud. The default is 70%.
Example usage:
|
-cloudSystemMemFreeMin= System Free Memory threshold |
Optional if using a Cloud agent. Specify the amount of free memory to use as the agent threshold when running scenarios in the Oracle Enterprise Manager Cloud. The default is 200MB.
Example usage:
|
-groupdatapercent= % users |
Optional. Specify the percentage of Virtual Users to rampup on the rampup trigger when running scenarios. Used with a ramptriggerafter setting.
Example usage:
|
-groupdatanumber= # users |
Optional. Specify the number of Virtual Users to rampup on the rampup trigger when running scenarios. Used with a ramptriggerafter setting.
Example usage:
|
-iteration= # iterations |
Optional. Specify the number of iterations to run when running scenarios.
Example usage:
|
-ramptriggerafteriterations= # iterations |
Optional. Specify the number of iterations to use as the VU rampup trigger when running scenarios. Used with the iteration setting.
Example usage:
|
-ramptriggerafterseconds= # seconds |
Optional. Specify the number of seconds to use as the VU rampup trigger when running scenarios. Used with a groupdata setting.
Example usage:
|
-ReplaceURLs= urlA = urlB |
Optional. Specify the URLs to replace within scripts when running scenarios.
Example usage:
|
-stopatdelay= # seconds |
Optional. Specify the number of seconds to run when running scenarios. This setting overrides any stop controls defined in the scenario file.
Example usage:
|
-stopattime= hh:mm:ss |
Optional. Specify the hour, minute, and second to use as the stop time when running scenarios. This setting overrides any stop controls defined in the scenario file.
Example usage:
|
- scriptname
|
Optional. Specify a script within a scenario to run. Optionally specify the target agent to use for the specified script(s) and/or the Virtual User count for the specified script(s) when running scenarios. Use double quotation marks if spaces are used the script name.
If
Example usages:
|
-target= target |
Optional. Specify the target agent to use when running scenarios. The target agent will be applied to all scripts in the scenario.
Example usage:
|
-VUCount= count |
Optional. Specify the Virtual User count to use when running scenarios. The Virtual User count will be applied to all scripts in the scenario. VUCount is case sensitive.
Example usage:
|
The following table lists the Status command line settings. These settings are used in addition to the General Settings.
Setting | Description |
---|---|
-session= sessionName |
Specify the name of the session. If not specified, the status of the currently running session is returned in the following format:
Example usage:
|
The following table lists the Stop command line settings. These settings are used in addition to the General Settings.
Setting | Description |
---|---|
-log= logfile |
Optional. Specify the path and file name of a log file.
Example usage:
|
-session= sessionName |
Optional. Specify the name of the session to stop. If not specified, the currently running session is stopped.
Example usage:
|