Single Machine Testing

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

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

  1. Download/Install the virtual machine product you choose.
  2. After you’ve installed, create a new virtual machine.
  3. The system will prompt you to enter settings for that machine, such as disk size, ram, etc.
  4. 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.
  5. Open Eggplant Functional, and add the new virtual machine to your connection list. Treat it as any other machine you wish to test against.
Note: 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 Fast-User Switching on Mac

As long as you are running Eggplant Functional on a Mac OS X (10.4 or later) machine you can author and test on the same computer using fast-user switching. One user will act as the Eggplant Functional machine, and another will act as the SUT.

Step by Step: Using Fast-User Switching to Create a SUT

Once you have Eggplant Functional installed and running, you should:

  1. Install Vine Server on the local machine.
  2. Enable fast user switching. This can be done by going to System Preferences > Users & Groups > Login Options.
  3. Allocate a user account as the test account. If you do not have another user on the local machine then create one.
  4. Using System Preferences, add Vine Server as a Login Item for the test account.
  5. Close System Preferences.
  6. Switch over to the test account by clicking on the current user’s name in the upper right corner of the screen.
  7. From the test account you should notice that Vine Server starts as soon as you login.
  8. Switch back to the account that you were logged in as: the main account that you normally run Eggplant Functional from.
  9. In Eggplant Functional, establish a connection to the VNC server which should show up under Bonjour servers in the list of available connections (or else via IP address of the local machine or via “your_Machine_name_here”.local).

By this time you should be able to see the desktop of the other user’s account, and you should be able to author scripts just like you would had Eggplant Functional been connected to a separate machine. If you are experiencing a repeated window/mirror effect then make sure that you are not connecting to an instance of the VNC server running on the same user account that is running Eggplant Functional.

Note: If you are testing an Adobe Flash or Flex Application, this setup will most likely not work, due to recent changes made to the Adobe Flash Player and how it deals with off-screen content.

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.

Requirements

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.

Note: 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

Note: 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.
  1. 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.
  2. 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.

    Example:

    "C:\Users\Abhijith>"C:\Program Files (x86)\eggPlant\runscript.bat" "C:\Users\Abhijith\Web4.suite\Scripts\Win7crossbrowser.script" -host localhost -port 5901

Passing Parameters

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.

Example:

"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"

 

This topic was last updated on June 21, 2019, at 02:49:49 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2019 Eggplant