Skip to main content

Connecting to the Same System (Single System Testing)

There are a few different ways you can use Eggplant Functional (EPF) to conduct tests using a single machine. Even though the original design was a two-system model, you can run EPF in a single-system model, with the EPF controller and your SUT on the same machine.

Diagram of the Eggplant Functional Single-System Model

Eggplant Functional (EPF) was originally designed to run as a two-system model, where EPF runs on one machine, sometimes called the "Eggplant machine" or "EPF controller," and drives tests on a second machine, called the "system under test" (SUT).

Diagram of the Eggplant Functional Two-System Model

Following is a description of why you might want to test with EPF in a single-system model and how it works.

Why Run on a Single System?

Runnning EPF in a single-system model provides several benefits, including the following:

  • You can automate tests on your own machine
  • You do not need a second machine
  • You do not need to open any ports on your machine
  • You are not vulnerable to SUT disconnections due to network disruptions

Methods for Single-System Testing

EPF supports the following methods for single-system testing:

Using the Eggplant Functional Machine Only (Without VMs)

It is possible to conduct single-system testing on the physical machine where you are running EPF without using Virtual Machines (VMs):

  • On Windows, using the Single System SUT connection type available in the EPF Connection List to connect to a child session on the same machine.
  • On Mac, using a different user account with the VNC SUT connection type available in the Connection List to connect to different user session on the same machine.

For information on using VMs see Using a Virtual Machine (VM) as your SUT on the Same Machine with EPF.

:::

Using the Single System Connection Type in EPF (Windows Only)

note

Support for this connection type was added in EPF 23.3.0 for Windows only.

To use the EPF Single System connection type, you must create a new connection in the EPF Connection List and choose Single System for the Connection Type option. See Connecting to SUTs and Single System Specific Options for detailed instructions about this connection type.

Important

Two important things to be aware of when you use Single System SUTs:

  1. You must create, save, and modify all EPF Single System type connections through the Connection List. You cannot create this type of connection as a temporary connection during a script run.

  2. Even though the Single System SUT is running as a child process on your EPF host machine, it is still using the same operating system. Any operating system-level failures could impact both the SUT and the host operating system.

When you establish a connection with an EPF Single System SUT, EPF connects to a picture-in-picture child session in the Windows system where you are running EPF. The desktop of the child session displays in the EPF Viewer window. You will see your EPF desktop shortcut, or any other application shortcuts on the desktop with it, in the SUT Viewer even though they are running in a separate "parent" session. The two sessions are isolated to the extent that you can interact with SUT through the Viewer window, like it is a completely separate machine. For example, you can download and launch applications, and run tests like you would in a two-system model. However, they are still using the same operating system and both systems could potentially be affected by failures.

note

Some applications will not run simultaneously in both the parent session where EPF is running and the child session opened by your Single System SUT connection. For example, the Chrome browser will not run in both sessions at the same time. If you want to use an application with this restriction in your tests, verify the application is not running in the session where EPF is running and open it in the SUT Viewer window (child session). For example, if you need Chrome for one of your tests, close it on the desktop where your EPF is running and open it on the SUT.

Connecting using the EPF Connection List

Because Single System connections connect to a child session on your EPF host machine, they use your same Windows credentials on that machine. We recommend enabling secure connections in EPF and using the Windows Credential Manager to manage your user name and password for these connections. See Secure SUT Connection Credentials information about implementing secure credential management in EPF.

As stated above, you must create Single System connections through the Connection List. See Step by Step: Entering Single System Connection Details on the Connection List page for informtion about creating Single System connections and establishing connections with them.

Connecting from a Script using SenseTalk

During test runs, you can connect to or switch to (activate) an existing Single System SUT connection by passing its name with the connect command in your test scripts.

For example:

connect 'mySUT'
note

The Single System SUT connection must exist in the Connection List before you can use it in a script. You cannot use the connect command to create a temporary Single System SUT connection and then use it during a script run.

Using a Different User Account and a VNC Connection Type (Mac Only)

To use single-system connections on a Mac, you can create a different user account on the machine and then create a VNC-type connection in the EPF Connection List, specifying the user and password for that account in your VNC connection.

Step by Step: Single System Connection on Mac with a Second User Account

  1. Create a new user account on the Mac from Apple > System Settings > Users & Groups. Creating a new user account in System Settings on Mac
  2. Go to Apple > System Settings > Sharing > Remote Management.
  3. Enable Remote Management: On and VNC viewers may control screen with password. Set a VNC password. Enabling Remote Management on Mac
  4. Go to EPF > Connection > Connection List and create a VNC connection with server: localhost, using the password set in the previous step, and the default VNC port. Create a VNC Connection in the Connection List
  5. Connecting to this SUT will display the login screen of the Mac. Enter the username and the password of the user created in step 1. Log in. After connecting, log in to the Mac user created in step 1.
  6. Use the EPF Viewer window to create / modify / run a SenseTalk script. At the end, log off the user from the EPF Viewer window / the VNC session. Just disconnecting the VNC session won’t log off the user and won’t allow another connection to that user. Log out after completing work
note

This approach allows a user to create and run scripts in the same way as if using a separate machine as a SUT. It uses the built-in VNC server on the Mac. It seems to be slower than other VNC servers and we have seen some problems with displaying drop-down lists.

Using a Virtual Machine (VM) as your SUT on the Same Machine with EPF

Virtual machines allow you to use EPF in its intended two-system model, with a desktop machine hosting EPF, and a virtual machine acting as the SUT. This single-system option is recommended for advanced EPF users who are familiar with running VMs.

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.