Runscript Command Line Options
To add multiple options, insert a space before each one. For more information about these commands, see Running from the Command Line.
To invoke scripts using the Eggplant command, which launches the Eggplant Functional GUI, see Eggplant Command Line Options.
Important: For Mac installations of Eggplant Functional version 18.0 and later, the path to call the runscript command has changed to /Applications/Eggplant.app/Contents/MacOS/runscript. You might need to update tests created in earlier versions of Eggplant Functional to prevent errors. You also can click the Install runscript in /usr/bin/local button in Eggplant > Preferences > Run Preferences to add the runscript command to your user path. This allows runscript to be called from any directory via the command line.
If you're running Eggplant Functional on a Mac and using a version older than 18.0, the runscript command path is /Applications/Eggplant.app/runscript.
Note: We use the term arguments to describe the options you pass with the runscript or Eggplant command when you run those commands from the command line. Other terms you might be familiar with include options and flags.
We use the term parameters to refer to the values that you pass as input to scripts. See Passing Parameters for more information about passing parameters to scripts when you run them from a command line.
Connection Information
Specify the connection information for a Virtual Network Computing (VNC) or Remote Desktop Protocol (RDP) system under test (SUT) using the runscript command with the following flags:
- -host: The hostname or IP address of a specific SUT to use for your scripts. When you pass a
-host argument, you can also specify a color depth, password, port, username, and connection name. - -connectionname: The desired name for a new connection being created. Used in conjunction with the -host flag, the -connectionname flag provides the SUT identification name for the connection. This value is returned by the Name parameter if the connectioninfo function is called.
- -port: The port of the software you are using to connect to the SUT. This is the port of either the VNC server or RDP connections, you provide the username and password for the host Windows machine.
- -username and -password: For VNC server connections to the SUT, you usually need to provide only the password. In rare cases, primarily when using UltraVNC, you might need the username. For RDP connections, you provide the username and password for the host Windows machine.
- -password64 or -pass_code64: If you use Base64 encoding for passwords or passcodes that include standard and nonstandard characters, you can use either the -password64 or -pass_code64 option. Use the -password64 option to pass Base64 encoded passwords and the -pass_code64 option to pass Base64 encoded passcodes. For more information about encoding passwords or passcodes to Base64 format, see Base64 (Encode and Decode).
- -colorDepth: The color depth of the SUT in the Viewer window: 8, 16, 32. (Default value: The native color depth of the SUT.)
- -type [RDP, VNC]: The type of connection. RDP specifies an RDP connection and is available for Windows SUTs only. RDP connections use port 3389 by default. VNC specifies a VNC connection. The default connection type is VNC. Omitting the -type parameter results in a VNC connection.
- -DefaultHeight and -DefaultWidth:These parameters specify to display the SUT screen, and the height and width in pixels at which it displays. These options are for use with RDP connections only, which means only when the -type option is included and set to RDP.
Examples:
Mac
Windows
Linux
WebDriver Connection Information
Specify the connection information for a WebDriver connection using the runscript command with the following flags:
- -webBrowser: Opens a WebDriver connection to a specific browser. Required.
- -webHost: The host for the WebDriver connection. Required unless -host has been specified.
- -webPort: Defines the port to use when creating a WebDriver connection. If no port is specified, port 4444 is used. Optional.
Examples:
Mac
Windows
Linux
Additional Arguments
You can use the runscript command to send passwords, control where logs are stored, pass parameters, and more.
-CommandLineOutput
Use: Controls whether script logs (the data shown in the log area of the Run window) are output.
Valid values: yes or no. To output script logs, set
Examples:
Mac
Windows
Linux
You can also set the CommandLineOutput global property within a script. Global properties that are changed in a script always override initial settings.
Note: Output set to standard error (stderr) is always displayed. For finer control over the output while running from the command line, you can use this syntax in your script:
write "THIS IS SOME OUTPUT" to error
-DefaultDocumentDirectory
Use: Specifies the starting directory for relative file paths to suites, such as the paths of helper suites.
Examples:
Mac
Windows
Linux
-GlobalResultsFolder
Use: Sets the name of the folder in which your script results are stored. The folder path can be absolute, or relative to the script's suite.
Examples:
Mac
Windows
Linux
-LicenseKey, -LicenseUser
Use: Adds a license key and user for use of Eggplant Functional.
Examples:
Mac
Windows
Linux
-LicenserHost
Use: You use the -LicenserHost argument to specify the location of the Eggplant Functional license server. You enter the -LicenserHost argument, followed by the IP address or hostname for the machine where your license server is running. Even if you specify the licenser host on the Eggplant License Registry panel, you might need to include this argument to run scripts from the command line.
Examples:
Mac
Windows
Linux
-LicenserPassword
Use: Use this flag if you've set up RLM to require a password.
Examples:
Mac
Windows
Linux
-param (-p)
Use: The -param argument passes a parameter to a script. You can use -param before or after the name of the script. Note that the -param string must precede each parameter in the script. The -p form is an abbreviation for the same argument. You can use them interchangeably.
Examples:
Mac
Windows
Linux
-repeat
Use: Repeats the scripts you are running a specified number of times.
Examples:
Mac
Windows
Linux
-ReportFailures
Use: Reports the number of failed scripts and suites back to the command line after script execution. Valid values: yes/no. Default value: yes. If you want Eggplant Functional to report the number of successful scripts and suites to the command line, set it to no.
Examples:
Mac
Windows
Linux
-ScaleFactors
Use: Sets the ScaleFactors global property.
Values: A string with a single value indicating scale, a range of scales, or both. Default value: Empty (effectively 1.0).
Examples:
Mac
Windows
Linux