Eggplant Functional is designed around a two-system model, described here. This requires that Eggplant Functional runs on one machine (often referred to as the Eggplant Functional controller), and that tests be executed against a second system, called the system under test (SUT).
There are a few ways of circumventing this, if using two systems presents a problem for your team. Options include:
- Using a Virtual Machine as your SUT *Recommended*
- Using the Eggplant Functional Machine Only *This provides limited functionality*
Using a Virtual Machine
Virtual machines allow you to use Eggplant Functional with its intended architecture, with a desktop machine hosting Eggplant Functional, and a virtual machine acting as the SUT.
Virtual machines, for those unfamiliar, are a way to run an operating system within a window, sharing resources with the host system. They provide a cost-effective way of hosting multiple operating systems on the same hardware.
Since a virtual machine behaves as an individual machine, you can use this as a SUT with Eggplant Functional. To set up a virtual machine, you can choose from a variety of virtual machine hosting products, which include VMWare, Parallels, and VirtualBox.
Regardless of which option you choose, the method of installation is the same. You will need an installation disk or disk image for the operating system you want to install.
Step by Step: Using a Virtual Machine as a SUT
- Download/Install the virtual machine product you choose.
- After you’ve installed, create a new virtual machine.
- The system will prompt you to enter settings for that machine, such as disk size, ram, etc.
- Once you’ve created the new machine, boot it up, and install a VNC Server on the virtual machine, noting it’s IP Address. For further information, see VNC Servers.
- Open Eggplant Functional, and add the new virtual machine to your connection list. Treat it as any other machine you wish to test against.
The host operating system needs to be the Eggplant Functional controller, and the virtual machine needs to be the SUT. Otherwise, you will get a “hall of mirrors” effect as VNC will be looking at itself.
Using the Eggplant Functional Machine Only
Eggplant Functional uses a two-system model, but under certain conditions it can also be set up using a single system model.
Why Run on a Single System?
This approach is usually used when one person has already developed scripts using the two-system approach with a development license, and another member of the team would like to run the scripts but does not have a separate machine to use as a SUT.
If a user is working remotely and needs to run a script, but doesn't have access to a VM or physical machine, they can run from the command line on their own machine by following these instructions.
In order for this to work, you will need to use Eggplant Functional via Command Line and you will not be able to access the Eggplant Functional interface. If Eggplant Functional is run in GUI mode on the same machine, it will generate a “Hall of Mirrors” effect, as the application will VNC into the same system and will be looking at itself.
Depending on your testing needs, you can also run a single system model by running Eggplant Functional in drive mode using Eggdrive.
Step by Step: Running Eggplant Functional on a Single System
All examples given in these instruction are written as if being run on Windows. Further information for running via command line on other platforms can be found here.
For this process, you must run Eggplant Functional scripts via the command line. For instructions about how to run via command line on Mac, Windows, or Linux, see Running from the Command Line.
When you are prompted to enter the Connection Information of the SUT (as when using the two-system model), use the connection information of localhost instead, as shown in the example below. The key difference is to connect into your local machine instead of a remote SUT.
"C:\Users\Abhijith>"C:\Program Files (x86)\eggPlant\runscript.bat" "C:\Users\Abhijith\Web4.suite\Scripts\Win7crossbrowser.script" -host localhost -port 5901
You can pass parameters to a single script or the last of multiple scripts to be run. At the end of the runscript call, type
-params, and then the parameters, separated by spaces. In the example below, the parameters are different browsers to be tested.
"C:\Users\Abhijith>"C:\Program Files (x86)\eggPlant\runscript.bat" "C:\Users\Abhijith\Web4.suite\Scripts\Win7crossbrowser.script" -host localhost -port 5901 –params "Chrome" "Safari" "Firefox" "Opera"