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.
Only Firefox browser is supported on Linux.
To run a script from the Windows command line, type:
[OpenScript Install Dir]/runScript.bat
Path
/
ScriptName
.jwg
[options
]
If OpenScript is not installed, but the OATS agent is installed, type on Windows and Linux respectively:
[OATS Install Dir]/agent/runScript.bat
Path
/
ScriptName
.jwg [
options
]
[OATS Install Dir]/agent/runScript.sh
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 following are reserved keywords that cannot be used as custom setting names:
-noUpdate -boot -classloaderProperties -plugins -firstUse -newUpdates -update -password -keyring
If many settings are required, use the -propertiesPath
setting to specify a file containing a larger number of properties. Select Export Playback Settings from the Tools menu to generate a .properties file for the script. See the -propertiesPath
setting in the General Settings for additional information.
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.
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 OpenScript 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. |
--disable-web-security |
For Chrome browser only. Disables web security in the Chrome browser (enables JavaScript cross domain). When set, a warning bar appears in the browser. This argument is used to enable JavaScript cross domain when handling frames in a web document. When traversing frames, Chrome cross-domain content scripts require this argument to be able to interact with each other. |
The following table lists the script encryption command line settings.
Setting | Description |
---|---|
-encrypt.password password
|
Specify script passwords from the command line for encrypted scripts. Passwords specified as a parameter are different from playback settings, which are not kept or accessible by the getSettings() API, nor are they printable in scripts.
Example usage: -encrypt.password xxx -a.encrypt.password yyy -b@a.encrypt.password zzz In this example, a "master" script has a child script "a", script 'a' has a grand-child script "b". ("a", "b" are the aliases of the child scripts). |
-encrypt.password.global |
Specify a global password that can be applied to any encrypted scripts. The -encrypt.password and - alias .encrypt.password takes precedence over -encrypt.password.global . The -encrypt.password.global password is applied only when the password of a script is not found in other arguments or is incorrect.
Example usage: -encrypt.password.global mypass |
-encrypt.password.prompt |
Enables interactively entering password for encrypted script one by one using the console. Useful only when the CLI is started from the console.
If specified, CLI will interactively ask to input the correct script password in the console (if the console exists). The password is not shown in the console. If you do not want to input the password of a script, press ENTER to skip to next encrypted script. Example usage: -encrypt.password.prompt |
-streamProperties |
Enables a way of passing arguments to the CLI by reading from STDIN. If specified, the CLI reads arguments from STDIN until \endStream plus a line separator is entered. The line separator is any one of line feed (\n ), carriage return (\r ), or carriage return followed immediately by linefeed. The charset used to decode the bytes from STDIN can be specified using the -streamCharset argument. The default charset is UTF-8.
If the CLI is started from a console, CLI will wait for arguments followed by The arguments in Example usage: -streamProperties -streamCharset UTF-16LE [STDIN] -settingIds settingValues [...] \endStream\r\n |
-streamCharset charset |
Specify a charset that will be used to decode the byte array read from STDIN to a string. Used only when -streamProperties is specified. If an illegal charset is specified, -streamCharset shows a warning message and uses UTF-8 instead.
Example usage: -streamProperties -streamCharset UTF-16LE |
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.globalHeaders headersList |
Specify any custom "Global Headers: string to use in the Request header for script playback. The format is in the form: name1:value1;name2:value2;name3:value3. For example: x-oracle-slm-message-id: bcn=<beacon_name>; svc=<service_name>;test=<test_name>;step={{@getTopLevelStepName())}}. |
-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. |
-http.requestInOne true|false |
Specify if the HTTP request is sent as one TCP package or two TCP packages. An HTTP request may contain two parts: headers and postdata. If the setting is set to true , the headers together with the postdata is sent in one TCP package. If false , the headers and post data are sent in order in two TCP packages. The default is false .
Example usage: getSettings().set("http.requestInOne", true); http.post(...); getSettings().set("http.requestInOne", false); |
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.expireDuration n |
Specify the number of seconds n to use for the socket 'idle timeout' and use a new connection when reusing an idle-timeout socket. This is used to specify the timeout for a socket that gets closed by the server side after a long idle period. |
-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.clearCacheAfterIteration true|false |
Specify whether or not the browser's cache should be cleared after the script completes each iteration of its run() section. This setting only applies when the cache is enabled using http.cacheEmulation . The default value is true , clear cache. |
-http.maxCacheSize size |
Specify the maximum amount of in-memory storage to allocate for cached document contents. This setting applies to all virtual users in the process, even though each virtual user keeps its own cached documents. After the in-memory cache is exhausted, document contents will be cached to a temporary folder on disk in <installDir>\agent\cache. There is no upper bound on how much disk storage may be used to store cached documents. The disk cache is cleared every time the agent process starts. The default value for OpenScript is 16MB. The default value for Oracle Load Testing is 128MB. |
-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.embededobject 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 ADF functional test command line settings.
Setting | Description |
---|---|
-adf.ONLY_USE_ABSOLUTELOCATOR true|false |
Set to true to only use the @absoluteLocator= attribute value of the object identification string to recognize ADF objects. The default value is false , disabled. |
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 . |
-formsft.SUPPRESS_JPSECURITY_DIALOG true|false |
Set to true to supress "Java Security Windows" and "Warning - Security" pop up windows during either script recording or play back when the client machine has Java Runtime Environement (JRE) that is 1.6.0_24 or newer. If the client machine has JRE that is 1.6.0_23 or older, no matter if this setting is enabled or disabled, "Java Security Windows" and "Warning - Security" pop up windows will not show during either script recording or play back. 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. |
-formslt.enable_message_log true|false |
Set to true to show forms message log details in the Console tab. When false , the message log details are not shown in the console. The default is false . |
-formslt.heartBeatInterval= interval in seconds |
Specifies how often to notify the forms server that the forms client is still alive when there is no user activitiy in the forms client. The default is 0 . |
The following table lists the Siebel load test command line settings.
Setting | Description |
---|---|
-siebel.correlationMode java |
Enables the JAVA-based correlation library. By default, Siebel load scripts play back using a DLL-based correlation library if running on Windows platforms or a .SO-based correlation library if running on Linux. The OpenScript Siebel load testing module also includes a platform independent, JAVA-based correlation library that can be enabled using an additional playback setting. |
The following table lists the shared data command line settings.
Setting | Description |
---|---|
-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.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 |
Specify the encrypted password to use for authentication. To generate an encryptedPassword value for use in this command:
This setting must also be used in conjunction with the Example usage:
--sharedData.encryptedPassword gLM7NB+n7Yba0FlspMDX8A -ENCRYPTION_PROPERTIES_FILE C:/Documents and Settings/username/osworkspace/.metadata/.plugins/oracle.oats.scripting.utilities/encryption.properties
|
-sharedData.obfuscatedPassword obfuscatedPassword |
Specify the obfuscated password to use for authentication. To generate an obfuscatedPassword value for use in this command:
Example usage: -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.auto_dismiss_alert true|false |
Specify whether or not JavaScript alert dialog boxes are automatically dismissed if they appear during playback. The default value is false . |
-web.browser_id n |
Specify the browser index value n . The default value is 0 . |
-web.browser_log_level level |
Specify the browser debug logging level. Valid level values are DEBUG , INFO , WARN , ERROR , or NONE . The default value is NONE . |
-web.capture_browser_only true|false |
Specify whether or not to capture only the contents of the browser window as a screenshot. The default value is true . |
-web.capture_entire_screen true|false |
Specify whether or not the entire screen is captured as a screenshot. The default value is false . |
-web.capture_entire_screen_on_fail true|false |
Specify whether or not a screen capture of the entire screen is saved to the results if a failure occurs during playback. The default value is true . |
-web.capture_frame true|false |
Specify whether or not to capture the HTML frames on the page during playback. The default value is true . |
-web.capture_html true|false |
Specify whether or not to capture the browser HTML during playback. The default value is true . |
-web.capture_screenshot true|false |
Specify whether or not to capture screenshots during playback. The default value is true . |
-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.capture_url true|false |
Specify whether or not to capture the page URL during playback. The default value is true . |
-web.clear_cache true|false |
Specify whether or not pages are cleared from cache between playback iterations. The default value is false . |
-web.clear_cache_before true|false |
Specify whether or not pages are cleared from cache before playback. The default value is false . |
-web.clear_persistent_cookies true|false |
Specify whether or not to clear browser persistent cookies between iterations. The default value is false . |
-web.clear_persistent_cookies_before true|false |
Specify whether or not to clear browser persistent cookies before starting playback. The default value is false . |
-web.clear_persistent_cookies_before true|false |
Specify whether or not to clear browser persistent cookies before starting playback. The default value is false . |
-web.clear_session_cookies true|false |
Specify whether or not to clear browser session cookies between iterations. The default value is false . |
-web.clear_session_cookies_before true|false |
Specify whether or not to clear browser session cookies before starting playback. The default value is false . |
-web.clear_cache true|false |
Specify whether or not to clear the browser cache between iterations. The default value is false . |
-web.date_format date_format_string |
Specify a date format string to override the default date format string used when performing date validation tests. |
-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.launch_new_browser true|false |
Specify whether or not to launch a new browser when playing back a different script. The default value is true . |
-web.log_jsevent true|false |
Specify whether or not script playback creates a log of the Javascript events (such as onmouseover, onmousedown, click, etc.) fired on HTML elements. The default value is false . |
-web.webdom_proxy_port n |
Specify the port used for communication between the web browser and the agent. The default value is 7666 . |
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.
ReportErrorAndContinue
- Report the error to the results log and continue script execution.
Pause
- Pause playback and wait for user's decision to continue or abort script execution.
The following table lists the general error recovery settings.
Setting | Description |
---|---|
err.basic.BINARY_DECODING_EXCEPTION |
Binary Decode Failed |
err.basic.CHILD_SCRIPT_EXCEPTION |
Child Script Failed |
err.basic.CREATE_VARIABLE_ERROR |
Create Variable Failed |
err.basic.ENCRYPTION_SERVICE_NOT_INITIALIZED |
Encryption Service Not Initialized |
err.basic.FILE_NOT_FOUND |
File Not Found |
err.basic.FUNCTION_EXCEPTION |
Function Failed |
err.basic.GENERAL_SCRIPT_EXCEPTION |
Unexpected Script Error |
err.basic.SEGMENT_PARSER_ERROR |
Segment Parser Failed |
err.basic.VARIABLE_NOT_FOUND |
Variable Not Found. |
err.basic.ENCRYPTION_SERVICE_NOT_INITIALIZED |
Encryption Service Not Initialized |
The following table lists the Flex load testing (AMF) error recovery settings.
Setting | Description |
---|---|
err.amfLT.OPERATION_INVOCATION_ERROR |
An operation on an object failed |
err.amfLT.PLAYBACK_ERROR |
Playback failed |
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.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 |
err.http.MATCH_ERROR |
Text Matching Test failed |
err.http.NODE_NOT_FOUND_EXCEPTION |
Element node not found with xpath exception |
err.http.RESPONSE_TIME_ERROR |
Response Time error |
err.http.SOLVE_ERROR |
Solve Variable failed |
err.http.ZERO_LENGTH_DOWNLOAD |
Zero Length Downloads |
The following table lists the Oracle EBS/Forms Functional Testing error recovery settings.
Setting | Description |
---|---|
err.formsFT.FORMS_FT_ERROR |
Oracle Forms Error |
err.formsFT.STATUSBAR_TEST_ERROR |
Status Bar Test 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 |
The following table lists the Oracle Hyperion Load Testing error recovery settings.
Setting | Description |
---|---|
err.HyperionLoad.RESPONSE_ERROR |
Server Error Message |
The following table lists the Web Functional Testing error recovery settings.
Setting | Description |
---|---|
err.webdom.FAIL_TO_PLAYBACK |
Playback Failed |
err.webdom.HTML_TEST_ERROR |
HTML Test Failed |
err.webdom.OBJECT_NOT_FOUND_ERROR |
Object Not Found |
err.webdom.RESPONSE_TIME_ERROR |
Response Time Error |
err.webdom.TITLE_TEST_ERROR |
Title Test Failed |
err.webdom.WAIT_FOR_PAGE_TIMEOUT_ERROR |
Wait for Page Timeout |
err.webdom.WEBDOM_SOLVE_ERROR |
Solve Variable Failed |
The following table lists the Utilities error recovery settings.
Setting | Description |
---|---|
err.utilities.SQL_ERROR |
SQL Execute Error |
err.utilities.XML_PARSING_ERROR |
XML Parsing Error |
err.utilities.VALIDATION_ROWCOUNT_ERROR |
SQL Validation Row Count Error |
err.utilities.CSV_LOADING_ERROR |
CSV Loading Error |