Creating Connections through a Command-Line Interface (CLI)
When you run Eggplant Functional (EPF) through a command-line interface (CLI), or in the Eggplant DAI or Eggplant Studio applications, you are using Eggplant Fusion Engine, also called 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. - 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.
How Eggplant Test Applications 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 called Eggplant Fusion Engine or 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 applications pass the connection information specified for the SUT to the runscript command at test runtime.
For more information about using runscript, or how to specify connections with runscript, see Running from the Command Line and Runscript Command Line Options, respectively.
Examples: Click the appropriate tab below to see examples of how to pass SUT connection information at the CLI with a runscript command on Windows, macOS, or Linux.
- Pass Connection Info in CLI on Windows
- on macOS
- on Linux
An example runscript command on Windows that defines the SUT connection by passing the -host, password, and -type parameters through the command-line interface (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 defines the SUT connection by passing the -host, password, and -type parameters through the command-line interface (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 interface (CLI) with the test script.
runscript ~/Documents/appTests.suite/Scripts/test1.script ~/Documents/appTests.suite/Scripts/test2.script