Creating Connections through the Command-Line Interface (CLI)
When you run Eggplant Functional (EPF) at a command-line interface, or in the Eggplant DAI or Eggplant Studio apps, you are using the Eggplant Fusion Engine, which is essentially EPF without its GUI. You launch Fusion Engine with the runscript command. In this situation, you can connect to a system under test (SUT) in one of two ways:
-
By passing connection information with the
runscriptcommand when you run a test as described below -
By including a
connectcommand within the test script that you are running from the command-line as described in Adding a Connection in a SenseTalk Script
Eggplant DAI, Functional, and Studio use Runscript
You can run Eggplant Functional (EPF) without its GUI from a command-line interface (CLI) using its runscript command. When EPF runs without its GUI using runscript, it is known as the Eggplant Fusion Engine. Eggplant Studio and DAI both use Fusion Engine to run and debug scripts.
When EPF launches with the runscript command, or Fusion Engine runs, they run SenseTalk scripts at the command line. If you are running EPF with runscript you can specify connection information for the SUT you want to run the script against. If you are using Eggplant Studio or DAI, those apps pass the connection information specified for the SUT to the runscript command at test runtime.
For more information about using runscript, see Running from the Command Line in the EPF product documentation. For more information about connection specifications with runscript, see Runscript Command Line Options.
To see examples of how to pass SUT connection information at the CLI with a runscript command on Windows, macOS, or Linux, click the appropriate tab below.
- Windows
- macOS
- Linux
An example runscript command on Windows that passes the SUT connection as the -host, password, and -type parameters at the command-line interfce (CLI) with the test script.
"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
An example runscript command on macOS that passes the SUT connection as the -host, password, and -type parameters at the command-line interfce (CLI) with the test script.
/Applications/Eggplant.app/Contents/MacOS/runscript /Users/Alex/Documents/appTests.suite/Scripts/test1.script /Users/Alex/Documents/appTests.suite/scripts/test2.script
An example runscript command on Linux that passes the SUT connection as the -host, password, and -type parameters at the command-line interfce (CLI) with the test script.
runscript ~/Documents/appTests.suite/Scripts/test1.script ~/Documents/appTests.suite/Scripts/test2.script