Oracle® Application Testing Suite OpenScript User's Guide Version 9.10 for Microsoft Windows (32-Bit) Part Number E15488-03 |
|
|
View PDF |
This appendix lists the parameters for running OpenScript scripts from the command line. All OpenScript scripts may be run from the command line assuming that:
All resources that the script depends on, including databank files, object library files, and other scripts it runs, must be accessible from the machine where the script is run.
The installed version of OpenScript or agent is newer or the same as the version used to create the script.
To run a script from the command line, type:
[OpenScript Install Dir]/runScript.bat
Path
/
ScriptName
.jwg
[options
]
If OpenScript is not installed, but the OATS agent is installed, type:
[OATS Install Dir]/agent/runScript.bat
Path
/
ScriptName
.jwg [
options
]
Path
is the full drive and directory path of the file location. When specifying file paths, use forward-slash (/) instead of back-slash (\) to ensure the back-slash notation is not misinterpreted in Java. If you must use back-slash notation, use double back-slashes (\\) in the file paths. For example, [OATS Install Dir]\\agent\\runScript.bat
.
[
options
]
may consist of any number of agent command line settings.
This section describes how to use the command line settings.
Zero or more agent command line settings may be specified using the following format:
-
settingId
settingValue
Example:
runScript "C:/OracleATS/OpenScript/DefaultRepository/Default!/script1/script1.jwg" -iterations 5 -iterationDelay 5
If a settingValue
contains spaces, the value may be enclosed inside double-quotation marks.
If a setting specifies a boolean true/false value, and no settingValue
is specified, then a true value is assumed.
Except where specifically noted, all settingId
values are NOT case-sensitive. For example, -iterations 10
means the same thing as -ITERATIONS 10
.
It is possible to view all settings passed to a script by typing the following code inside an OpenScript script:
info(getSettings().toString());
Custom settings may be used in a script and specified on the command line. For example, consider a script with a setting "todaysURLToTest":
public void run() throws Exception { info("Today we will test the URL " + getSettings().get("todaysURLToTest")); }
The setting may be specified on the command line using:
-todaysURLToTest "http://www.oracle.com/"
The runScript
program can only accept 9 command line arguments. Use the -propertiesPath
setting to specify a file containing a larger number of properties.
Certain settings only apply to scripts that have a particular module applied. For example, HTTP load test script settings do not apply to Web functional test scripts.
The following table lists the General command line settings.
Setting | Description |
---|---|
-dboptions alias : index : mode : range , alias : index : mode : range ,... |
Specify which databank records to use when playing back the script. Use
Regardless of the databank setting, the VU will never run for more iterations than specified in the Example 1: To loop over records starting at the 5th row in the databank with alias "fmstocks_data", use: -dboptions fmstocks_data:5:LOOP_FOREVER Example 2: A databank with alias "fmstocks_data" contains 15 records. To iterate over records 5 through 10, starting at record 7 (i.e. 7,8,9,10,5,6,7,8,9,10,5,6...), for at most 100 iterations, use: -iterations 100 -dboptions fmstocks_data:7:LOOP_FOREVER:5:10 |
-delayPercentage mode |
Specify how long to delay between steps in a script. Depending on the mode , this setting may be used in conjunction with other settings. mode should be one of the following numbers:
|
-iterationDelay n |
Pause for n seconds between iterations. |
-iterations n |
Run n iterations of the script. |
-loglocalvudisplay true|false |
Create VUDisplay.txt and VUDisplay.csv result output files in the folder from which the agent was launched. The Virtual User Display output is not supported by functional test modules. The loglocalvudisplay setting is case-sensitive and must be exactly loglocalvudisplay. |
-noReport true|false |
Set to true to disable generation of the results report. The default is false . |
-preserveVariables true|false |
Set to true to preserve variables between iterations, false to clear variables between iterations. Variables refer to variables set using the Variables service, i.e. getVariables().set() , not local Java code variables. |
-propertiesPath path |
Specify the full path of a Java .properties file containing additional command line setting name=value pairs to add.
Example usage: -propertiesPath "C:/additionalSettings.properties" |
-resultReportFolder path |
Specify the output folder for all result report files.
If it is not specified, the default output folder will be: Example usage: -resultReportFolder "C:/result" The output folder would be: |
-reportName name |
Override the file name used when generating the result report HTML file. Specify the name of the report including an extension, but excluding any path information. For example:
-reportName results.html If not specified, OpenScript will determine a meaningful name for the result report HTML file based on the type of script being run. For example, an HTTP load test script calls its report httpReport.htm. A functional test script such as a Web functional test script calls its report FTReport.htm. |
-repository repositoryString |
Specify the physical locations of one or more named repositories. repositoryString takes the form repositoryName= fullPathToRepository ,repositoryName2= fullPathToRepository2 ,... This setting is required.
When you run Version 9.0 OpenScript scripts from the Version 9.10 Command Line Interface, you must use the In Version 9.0, The Oracle Load Testing Virtual User Agent would use the default repository ( Always specify the Example usage: -repository "JohnComputer.johndoe.Default=D:/OracleATS/OFT,SharedRepository=\\testserver/OurScripts" |
-stopVUserOnFailure true|false |
Specify whether or not the virtual user will continue running more iterations after a fatal error. Use the Error Recovery settings to control which errors should be fatal. |
The following table lists the Browser command line settings.
Setting | Description |
---|---|
-browser.type type |
Specify the browser type to use for script playback where type is one of the following (use exact case and no spaces):
The default is |
-browser.startupTimeout n |
Specify n seconds to wait for the browser to start before timing out. The default is 15 seconds. |
-browser.overridePath path |
OpenScript automatically detects where Internet Explorer and Firefox browser processes physically exist in the file system. In case the path to one of these browsers is incorrect, specify an alternative path to use when launching the specified browser type. This setting is not intended to be used to specify the path to an unsupported browser.
Example usage: -browser.pathOverride "D:/Programs/Firefox/firefox.exe" |
-browser.extraArgs args |
Specify any additional startup arguments that OpenSript should use when launching the browser process on playback. The default is no additional arguments other than what OpenScript may require internally. |
-browser.hide true|false |
For Internet Explorer browser only, specify true to hide the browser during playback. This setting has no effect on Firefox. If certain actions in the script require the browser to be visible, such as key presses and physical mouse clicks, the script will not playback correctly. The default is false; browser is visible. |
The following tables list the HTTP command line settings.
The following table lists the proxy command line settings.
Setting | Description |
---|---|
-http.proxyHost host |
Set the proxy host to the specified host . If no proxy host is specified, then no proxy is used.
Example usage: -http.proxyHost "proxyserver.mycompany.com" |
-http.proxyPort port_number |
Set the proxy port to the specified port_number .
Example usage: -http.proxyPort 1234 |
-http.proxyUsername username |
If the proxy host requires authentication, provide the username . Ignored if http.proxyHost and http.proxyPort are not set. |
-http.proxyPassword password |
If the proxy host requires authentication, provide the password . Ignored if http.proxyHost and http.proxyPort are not set. The password is not encrypted when provided on the command line. |
-http.nonProxyHosts hostsList |
Specify a list of host names that the agent should not forward through the specified proxy defined by http.proxyHost and http.proxyPort . Separate multiple host names by a | delimeter. The host name must match the host being requested, as seen in the Host HTTP request header. |
The following table lists the compression command line settings.
Setting | Description |
---|---|
-http.useGzip true|false |
Enable GZIP compression. The client will add gzip to every Accept-Encoding HTTP request header. If the server responds with GZIP-compressed data, OpenScript will decompress it. The default value is true . |
-http.useDeflate true|false |
Enable Deflate compression. The client will add deflate to every Accept-Encoding HTTP request header. If the server responds with Deflate-compressed data, OpenScript will decompress it. The default value is false . |
The following table lists the header command line settings.
Setting | Description |
---|---|
-http.userAgentHeader |
Browser Emulation. Specify the User-Agent header string to use when making requests. It is not required and harmless to include the User-Agent: prefix in the value itself. Most OpenScript scripts override this setting with the User-Agent header value found during recording.
Example usage: -http.userAgentHeader "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" |
-http.language language |
Set the value of the Accept-Language HTTP header. If no value specified, the agent tries to determine the language header by looking at the system language. |
-http.version version |
Specify the HTTP version string to append to each request, i.e. HTTP/1.1 or HTTP/1.0 . If no value specified, agent will use HTTP/1.1 |
-http.accept acceptString |
Specify the HTTP Accept header to send by default for all requests. |
The following table lists the connection command line settings.
Setting | Description |
---|---|
-http.useKeepAlive true|false |
Specify whether or not to keep HTTP connections alive after using them. Default is true to enable keep-alive connections. |
-http.maxKeepAliveRequests n |
Specify an integer n number of requests to make before closing a keep-alive connection. Must be used together with http.useKeepAlive . |
-http.maxConnections n |
Specify an integer n maximum number of connections a single virtual user may have open concurrently before blocking (waiting) for a new connection to become available. This setting only applies in OpenScript when concurrent sections are used in the script. The default value if not set is 2 connections per virtual user. |
-http.connectionSpeed n |
Specify the number of bytes/sec n to limit the download speed. For example, to download at 56KBps, specify 56000 . If no value specified, or an empty string is specified, this method assumes true line speed should be used. |
The following table lists other HTTP command line settings.
Setting | Description |
---|---|
-http.ignoredUrls list_of_urls |
Specify a comma-separated list of case-insensitive URLs not to request during playback. The URLs only need to be the ENDS of URLs, not the entire URLs.
Example usage: -http.ignoredUrls ".jpg,.gif,.css." |
-http.cacheEmulation mode |
Specify if/how the browser should cache downloaded contents. Each virtual user maintains its own cache. The mode value is one of the following values:
The default value is |
-http.useCookies true|false |
Specify whether or not to allow the browser to remember and use session or persistent cookies during playback. The default value is true , use cookies. |
-http.downloadLocalFiles true|false |
Specify whether or not the agent should download files that exist in the local file system. When local files are not downloaded, the contents are not displayed in the Oracle Load Testing Virtual User Display, and it is not possible to solve variables against the contents, for example. The default value is false , do not download local files. |
-http.preserveCookies true|false |
Set to true if cookies should be preserved between iterations. Set to false if cookies will be cleared between iterations. The default value is false , do not preserve cookies between iterations. |
-http.preserveConnections true|false |
Set to true if the browser should attempt to reuse any open browser connections if possible between iterations. Each virtual user maintains its own set of connections that it never shares with other virtual users. The default value is true , preserve connections between iterations. |
-http.maxContentSize n |
Specify the maximum number of kilobytes (KB) to download from a server for a given request. Set to -1 to mean unlimited download size. The default value is -1 , unlimited. |
-http.socketTimeout n |
Specify the socket timeout in n seconds. The default value is 120 seconds. |
The following table lists the Download Manager command line settings.
Setting | Description |
---|---|
-http.useDownloadManager true|false |
Specify if the Download manager is enabled during playback. The default is false . |
-http.downloadManager.css true|false |
Specify if css resources in <Link> tags are downloaded during playback. The default is false . |
-http.downloadManager.Image true|false |
Specify if image resources in <Img> tags, in the "background" attribute of a tag, or in <style> tags with "background:url" patterns are downloaded during playback. The default is false . |
-http.downloadManager.embedobject true|false |
Specify if object resources in <Embed> tags or in <Object> tags are downloaded during playback. The default is false . |
-http.downloadManager.script true|false |
Specify if script resources in <Script> tags are downloaded during playback. The default is false . |
-http.downloadManager.applet true|false |
Specify if applet resources in <Applet> tags are downloaded during playback. The default is false . |
-http.ignoredUrlRegexps string |
Specify the Regular Expression(s) string to use to ignore specific resources. For example, the expression Login_Banner(.+?) would not download resources such as Login_Banner1.gif and Login_Banner2.gif. Multiple Regular Expressions can be separated using a comma (,). |
The following table lists the functional test command line settings.
Setting | Description |
---|---|
-ft.smartMatch format |
Specifies which format to use to match attributes in an object path. The match format can be a wildcard-formatted or a regular-expression-formatted expression. format is one of the following settings:
|
-ft.smartMatch true|false |
When true, the OpenScript Smart Match object identification ranking feature is enabled. The default value is true , enabled. |
The following table lists the Oracle EBS/Forms functional test command line settings.
Setting | Description |
---|---|
-formsft.startup_timeout n |
Specify n seconds to wait for the Forms applet to start up before failing the script due to a timeout. The default value is 30 seconds. |
-formsft.action_timeout n |
Specify n seconds to wait when trying to play an action before timing out because the object required could not be found. The default value is 30 seconds. |
-formsft.capture_screenshot true|false |
Set to true to capture screenshots of the Forms applet during playback. The default value is true . |
The following table lists the Oracle EBS/Forms load test command line settings.
Setting | Description |
---|---|
-formslt.capture_message_details true|false |
Set to true to capture message details during playback. When true, OpenScript captures and stores Forms message requests, responses, and information about all loaded Forms components during playback. This information is useful to have when debugging the script.
OpenScript displays captured details in the "Messages" and "Object Details" tabs of the Details view. Oracle Load Testing displays this information in the Virtual User Display based on the "Virtual User Display" settings. Capturing message details is a memory-intensive operation. During heavy load testing, it is recommended to clear this setting to reduce the amount of heap space required by the agent. |
The following table lists the shared data command line settings.
Setting | Description |
---|---|
-ENCRYPTION_PROPERTIES_FILE path \encryption.properties |
Specify the full path and file name to use for encrypted password authentication. The file name is C:\Documents and Settings\username\osworkspace\.metadata\.plugins\oracle.oats.scripting.utilities\encryption.properties. Set the password encryption to Encrypt script data in the General Encryption Preferences. Generate the encrypted password by selecting Add from the Script menu, expanding the Shared Data folder and selecting Set Connection Parameters. Specify the connection parameters then specify the path and file name in your command line settings. |
-sharedData.actionTimeout timeout |
Specify the maximum time in seconds to wait for the requested data to return. |
-sharedData.Address address |
Specify the address of the Oracle Load Testing for Web Application server to use for the shared data service. For example: t3//:localhost:8088 or t3://machinename.us.oracle.com:8088. |
-sharedData.Password password |
Specify the password to use for authentication. Note that this is a clear text password that is not secure. |
-sharedData.encryptedPassword encryptedPassword -ENCRYPTION_PROPERTIES_FILE path \encryption.properties |
Specify the encrypted password to use for authentication. Set the password encryption to Encrypt script data in the General Encryption Preferences. Generate the encrypted password by selecting Add from the Script menu, expanding the Shared Data folder and selecting Set Connection Parameters. Specify the connection parameters then copy the encrypted password from the Java Code view to your command line settings similar to the following example:
-sharedData.encryptedPassword gLM7NB+n7Yba0FlspMDX8A== -ENCRYPTION_PROPERTIES_FILE path encryption.properties
|
-sharedData.obfuscatedPassword obfuscatedPassword |
Specify the obfuscated password to use for authentication. Set the password encryption to Obfuscate script data in the General Encryption Preferences. Generate the obfuscated password by selecting Add from the Script menu, expanding the Shared Data folder and selecting Set Connection Parameters. Specify the connection parameters then copy the obfuscated password from the Java Code view to your command line settings similar to the following example:
-sharedData.obfuscatedPassword RG5CE6b1u8cG9VzbbnW6cQ== |
-sharedData.UserName name |
Specify the user name to use for authentication. The default name is oats unless changed in the Oracle Application Testing Suite configuration. |
The following table lists the Web functional test command line settings.
Setting | Description |
---|---|
-web.event_time_out n |
Specify the Object Timeout n in seconds. If an object cannot be found in n seconds, the action will fail. The default value is 60 . |
-web.capture_html true|false |
Specify whether or not to capture the browser HTML during playback. |
-web.capture_screenshot true|false |
Specify whether or not to capture screenshots during playback. |
-web.clear_cookies true|false |
Specify whether or not to clear browser cookies between iterations. |
-web.clear_cache true|false |
Specify whether or not to clear the browser cache between iterations. |
-web.webdom_proxy_port n |
Specify the port used for communication between the web browser and the agent. The default value is 7666 . |
-web.capture_screenshot_interval n |
Specify the number of milliseconds to wait after a new page is detected and the screenshot is captured. The default value is 500 . |
-web.date_format date_format_string |
Specify a date format string to override the default date format string used when performing date validation tests. |
All Error Recovery settings are specified using the form:
-
errorRecoverySettingId action
action
is one of the following constants (case-sensitive):
Ignore
- proceed with the script as if the error did not occur. The error will still be logged to the console/log file.
Warn
- report the error, but continue running the script.
Fail
- report the error and fail the current iteration of the script.
The following table lists the general error recovery settings.
Setting | Description |
---|---|
err.basic.VARIABLE_NOT_FOUND |
Variable Not Found. |
err.basic.CREATE_VARIABLE_ERROR |
Create Variable Failed |
err.basic.FILE_NOT_FOUND |
File Not Found |
err.basic.SEGMENT_PARSER_ERROR |
Segment Parser Failed |
err.basic.BINARY_DECODING_EXCEPTION |
Binary Decode Failed |
err.basic.ENCRYPTION_SERVICE_NOT_INITIALIZED |
Encryption Service Not Initialized |
err.basic.GENERAL_SCRIPT_EXCEPTION |
Unexpected Script Error |
The following table lists the functional testing error recovery settings.
Setting | Description |
---|---|
err.functionalTest.FT_MATCH_ERROR |
Text Matching Test failed |
err.functionalTest.OBJECT_TEST_ERROR |
Object Test failed |
err.functionalTest.TABLE_TEST_ERROR |
Table Test failed |
The following table lists the HTTP error recovery settings.
Setting | Description |
---|---|
err.http.ZERO_LENGTH_DOWNLOAD |
Zero Length Downloads |
err.http.MATCH_ERROR |
Text Matching Test failed |
err.http.RESPONSE_TIME_ERROR |
Response Time error |
err.http.SOLVE_ERROR |
Solve Variable failed |
err.http.HTML_PARSING_ERROR |
HTML Parsing error |
err.http.INTERNET_INVALID_URL |
Invalid URL |
err.http.INVALID_HTTP_RESPONSE_CODE |
Invalid HTTP Response Code |
err.http.KEYSTORE_LOAD_ERROR |
Client Certificate Keystore error |
The following table lists the Oracle EBS/Forms Functional Testing error recovery settings.
Setting | Description |
---|---|
err.formsFT.FORMS_FT_ERROR |
Oracle Forms Error |
The following table lists the Oracle EBS/Forms Load Testing error recovery settings.
Setting | Description |
---|---|
err.formsLT.CONNECT_ERROR |
Forms Connect Error |
err.formsLT.IO_ERROR |
Forms Input/Output Communication Error |
err.formsLT.MATCH_ERROR |
Forms Content Match Failed |
err.formsLT.PLAYBACK_ERROR |
Forms Playback Error |
err.formsLT.COMPONENT_NOT_FOUND |
Forms Component Not Found |