Eggplant Command Line Options
This page explains the different options you can use when you run Eggplant Functional scripts from a command line using the Eggplant
command. This command launches the Eggplant Functional GUI. Note that if you run one of these options using the runscript
command, the Eggplant Functional GUI launches. See Runscript Command Options to learn more about the runscript
command.
For more information about these commands, see Running from the Command Line.
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.
-AlertOnError
Use
Boolean. (Yes/No) Specifies whether to show an alert when script execution fails.
Examples
Mac
/Applications/eggPlant.app/Contents/MacOS/Eggplant -RunOnLaunch /Users/Alex/appTests.suite/Scripts/test3.script -AlertOnError yes
Windows
"C:\Program Files\eggPlant\eggPlant.bat" -RunOnLaunch "C:\Users\Alex\Documents\MyTests.suite\scripts\test3.script" -AlertOnError yes
Linux
Eggplant -RunOnLaunch ~/Documents/appTests.suite/Scripts/test1.script -AlertOnError yes
This parameter overrides the Eggplant Functional General Preference for Alert user when script execution fails.
-AlertOnFailedConnections
Use
Boolean. (Yes/No) Specifies whether to show an alert when a connection fails.
Examples
Mac
/Applications/eggPlant.app/Contents/MacOS/Eggplant -RunOnLaunch /Users/Alex/appTests.suite/Scripts/test3.script -AlertOnFailedConnections yes
Windows
"C:\Program Files)\eggPlant\eggPlant.bat" -RunOnLaunch "C:\Users\Alex\Documents\MyTests.suite\scripts\test3.script" -AlertOnFailedConnections yes
Linux
Eggplant -RunOnLaunch ~/Documents/appTests.suite/Scripts/test1.script -AlertOnFailedConnections yes
This parameter overrides the Eggplant Functional General Preference for Show alert when a connection fails.
-AutoShowRunWindow
Use
Boolean. (Yes/No) Specifies to bring the Run window forward when the script is run.
Examples
Mac
/Applications/eggPlant.app/Contents/MacOS/Eggplant -AutoShowRunWindow yes
Windows
"C:\Program Files\Eggplant\Eggplant.bat" -AutoShowRunWindow yes
Linux (bash shell)
Eggplant -AutoShowRunWindow yes
The -AutoShowRunWindow
flag overrides the Eggplant Functional General Preference for Bring the Run window forward when a script is run.
-DefaultDocumentDirectory
Use
A path to a directory. Specifies the starting directory for relative file paths to suites, such as the paths of helper suites.
Examples
Mac
/Applications/eggPlant.app/Contents/MacOS/Eggplant -DefaultDocumentDirectory ~/Documents/EggplantDocs
Windows
"C:\Program Files\Eggplant\eggPlant.bat" -DefaultDocumentDirectory "C:\Users\Elizabeth\Documents\eggPlantTests"
Linux
Eggplant ~/Documents/appTests.suite/Scripts/test1.script -DefaultDocumentDirectory ~/Documents
This is the same as the Eggplant Functional General Preference for Default Suite Directory.
-open
Use
A path to a suite or script. The -open
argument launches Eggplant Functional from the command line with a suite open. Include the path to the specific suite with the -open
argument. The -open
argument also can open specific scripts. Include the path to the specific script to do this.
Examples
Mac
/Applications/eggPlant.app/Contents/MacOS/Eggplant -open ~/Documents/appTests.suite
/Applications/eggPlant.app/Contents/MacOS/Eggplant -open ~/Documents/appTests.suite/scripts/testscript.script
Windows
"C:\Program Files\eggPlant\Eggplant.bat" -open "C:\Users\Alex\Documents\appTests.suite"
"C:\Program Files\eggPlant\Eggplant.bat" -open "C:\Users\Alex\Documents\appTests.suite\scripts\testscript.script"
Linux
Eggplant -open ~/Documents/appTests.suite
Eggplant -open ~/Documents/appTests.suite/scripts/testscript.script
-param (-p)
Use
A single parameter. The -param
argument passes parameters 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 parameter. You can use them interchangeably.
The -param
argument (without an "s" on the end) is not the same as the older -params
parameter.
Examples
Mac
/Applications/eggPlant.app/Contents/MacOS/Eggplant -RunOnLaunch ~/Documents/appTests.suite/Scripts/test1.script -param "SUT1" -param "phonebook.txt"
Windows
"C:\Program Files\eggPlant\Eggplant.bat" -RunOnLaunch "C:\Users\Alex\Documents\MyTests.suite\scripts\test1.script" -param "SUT1" -p "phonebook.txt"
Linux
Eggplant -RunOnLaunch ~/Documents/appTests.suite/Scripts/test1.script -p "SUT1" -p "phonebook.txt"
-paramValue (-pv)
Use
A single parameter expression. The -paramValue
argument (or its abbreviation, -pv
) can be used to pass a list, property list, or other complex parameter value to a script. The SenseTalk Value
Function is applied to the supplied value before passing it to the script.
You can freely mix the use of -paramValue
and -param
in your call. Values following -param
or -p
are passed as literal strings to the script. Values following paramValue
or -pv
are evaluated as SenseTalk expressions and the evaluated value is passed to the script.
Examples
Mac
/Applications/eggPlant.app/Contents/MacOS/Eggplant ~/Documents/appTests.suite/Scripts/test1.script -paramValue "[SUT1,SUT2]" -paramValue "{x:34, y:125}"
Windows
"C:\Program Files\eggPlant\Eggplant.bat" "C:\Users\Alex\Documents\MyTests.suite\scripts\test1.script" -p "SUT1" -pv "[1,2,3,5,9]"
Linux
Eggplant ~/MyTests.suite/Scripts/test1.script -paramValue "the international time" -pv '{name:"Joe User", id:"143G-2", password:"top secret"}'
-QuitAfterRun
Use
Boolean. (Yes/No) Invokes the given script or suite schedule, then quits Eggplant Functional. To cancel the quit, open Eggplant Functional, choose Eggplant from the main menu, then Quit. Then click the Cancel Quit button.
Examples
Mac
/Applications/eggPlant.app/Contents/MacOS/Eggplant -RunOnLaunch /Users/Alex/Docs.suite/Scripts/myTests/test2.script -QuitAfterRun yes
Windows
"C:\Program Files\Eggplant\Eggplant.bat" -RunOnLaunch "C:\Users\Alex\Documents\MySuite.suite\Scripts\test2.script" -QuitAfterRun yes
Linux
Eggplant -RunOnLaunch ~/Documents/appTests.suite/Scripts/test1.script ~/Documents/appTests.suite/Scripts/test2.script -QuitAfterRun yes
-ReopenDocuments
Use
Boolean. (Yes/No) Specifies whether to reopen the last open suites and scripts when you launch Eggplant Functional.
Examples
Mac
/Applications/eggPlant.app/Contents/MacOS/Eggplant -ReopenDocuments No
Windows
"C:\Program Files\Eggplant\Eggplant.bat" -ReopenDocuments no
Linux
Eggplant -ReopenDocuments no
This parameter overrides the Eggplant Functional General Preference for Reopen suites from last session.
-RestoreConnection
Use
Boolean. (Yes/No) Specifies whether to restore connections from the last session when you launch Eggplant Functional.
Examples
Mac
/Applications/eggPlant.app/Contents/MacOS/Eggplant -RestoreConnection yes
Windows
"C:\Program Files\Eggplant\Eggplant.bat" -RestoreConnection yes
Linux
Eggplant -RestoreConnection yes
This parameter overrides the Eggplant Functional General Preference for Reopen connections from last session.
-RunOnLaunch
Use
A path to a script or suite schedule. Invokes the specified script(s) or suite schedule when you launch Eggplant Functional.
Examples
Mac
/Applications/eggPlant.app/Contents/MacOS/Eggplant -RunOnLaunch /Users/Alex/Alex_Tests.suite/Schedule1
Windows
"C:\Program Files\Eggplant\Eggplant.bat" -RunOnLaunch "C:\Users\Alex\Documents\Eggplant\MySuite.suite\Schedule1"
Linux
Eggplant -RunOnLaunch ~/Documents/appTests.suite/scripts/test1.script
-ScaleRemoteScreen
Use
Boolean. Default: Off. Scales the remote screen of mobile (iOS or Android) devices to 50% of their original size unless otherwise specified by the ScreenScaleRatio
setting which can also be passed as a command line flag. Available for use with VNC connections only.
Once set via the command line, this setting persists in the Eggplant Functional connection list item for that connection. This can be re-set by running another command line call to set scaleRemoteScreen
to off, or de-selecting the Screen Scale Ratio checkbox in the Eggplant Functional connection interface.
Examples
Mac
/Applications/Eggplant.app/Contents/MacOS/Eggplant -RunOnLaunch ~/Desktop/MySuite.suite/Scripts/ToRunFromCLI.script -scaleRemoteScreen yes -host 10.1.11.111 -port 5902 -password securePassword
Windows
“C:\Program Files\Eggplant\Eggplant.bat” -RunOnLaunch “C:\Users\Dave\My Documents\MySuite.suite\Scripts\ToRunFromCLI.script” -scaleRemoteScreen yes -screenScaleRatio 3 -host 10.1.11.150 -port 5901 -password securePassword
Linux
eggplant -RunOnLaunch ~/Documents/TestSuite.sute/Scripts/ToRunfromCLI.script -scaleRemoteScreen yes -screenScaleRatio 2 -host 10.1.11.182 -port 5902 -password securePassword
-ScreenScaleRatio
Use
Integer value N. Determines the screen scale ratio 1:N where N is an integer value provided by the user. This setting modifies the scale used by the ScaleRemoteScreen
setting, which has a default N value of 2 (scaling the remote screen to 50%).
Examples
Mac
/Applications/Eggplant20.app/Contents/MacOS/Eggplant -RunOnLaunch ~/Desktop/Elizabeth.suite/Scripts/ToRunFromCLI.script -scaleRemoteScreen yes -scaleScreenRatio 3 -host 10.1.11.120 -port 5901 -password securePassword
Windows
“C:\Program Files\Eggplant\Eggplant.bat” -RunOnLaunch “C:\Users\Dave\My Documents\MySuite.suite\Scripts\ToRunFromCLI.script” -scaleRemoteScreen yes -screenScaleRatio 4 -host 10.1.11.111 -port 5902 -password securePassword
Linux
eggplant -RunOnLaunch ~/Documents/TestSuite.sute/Scripts/ToRunfromCLI.script -scaleRemoteScreen yes -screenScaleRatio 3 -host 10.1.11.210 -port 5901 -password securePassword