Runscript Command Line Options
This page explains the different options you can use when you run Eggplant Functional scripts from a command line using the runscript
command. This command runs scripts without launching the Eggplant Functional GUI.
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 allowsrunscript
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
.
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
RDP & VNC
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 theName
parameter if theconnectioninfo
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 Windowsmachine.-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
Here are some examples demonstrating VNC and RDP connections with the runscript
command.
Mac VNC and RDP Connection Examples
/Applications/Eggplant.app/Contents/MacOS/runscript /Users/Alex/Docs.suite/Scripts/myTests/test2.script -host <ip address> -port 5901 -username <username> -password <password>
Windows VNC and RDP Connection Examples
"C:\Program Files\Eggplant\runscript.bat" "C:\Users\Alex\Documents\MySuite.suite\Scripts\test2.script" -host <ip address> -password "<password>" -type rdp -DefaultWidth 1920 -DefaultHeight 1080
Linux VNC and RDP Connection Examples
runscript ~/Documents/appTests.suite/Scripts/test1.script -host <ip address> -port 5901 -username "<username>" -password <password>