Configuring the Eggplant DAI Execution Environment

A model in Eggplant DAI can be connected to a suite in Eggplant Functional, and the interactions with your system under test (SUT) can be handled by SenseTalk code snippets. An execution environment comprises an agent, an Eggplant Functional software instance, and a system under test (SUT). It lets you manage the interaction between Eggplant DAI and Eggplant Functional. You can access the Eggplant DAI server from any connected machine on your network with a supported browser.

What Is the Agent?

The agent is part of an execution environment, which enables you to establish a connection between the Eggplant DAI web application and Eggplant Functional. The execution environment name you enter in the Execution Environment dialog box can be used in Eggplant DAI to choose where tests will be run. With the agent software running and the execution environment connection active, you can attach SenseTalk snippets to actions and states in any Eggplant DAI model that's associated with the agent. Running the model then executes the SenseTalk snippets against a SUT connected via the agent, and the results can be viewed in the console in Eggplant AI.

The agent can run on the same machine as the Eggplant DAI server, or any local or hosted machine that can connect to the Eggplant DAI server via the network.

Important: In order for SenseTalk snippets to execute, Eggplant Functional must be installed on the same machine as the Eggplant AI Agent software.

Downloading and Installing the Agent

The agent is available as a Windows .exe file, a Mac app, or raw Python. Go to File > Manage Execution Environments in Eggplant DAI to open the Manage Execution Environments window. Select the appropriate button for your platform to download the agent:

The Manage Execution Environments window to download an agent for your platform

Download Agents and manage Execution Environments

When you create and save execution environments, they appear in the Manage Execution Environments window. You can edit or remove execution environments from this window as well. Note that you can view and edit any agents created in any groups you belong to from the Manage Execution Environments window.

Windows

  1. Go to File > Manage Execution Environments and select Windows Installer. The eggplantAIagent.exe file is saved to your Downloads folder.
  2. Open eggplantAIagent.exe, then follow the prompts to complete the installation. The installer saves a shortcut to Eggplant AI Agent on the Start menu.

Mac

  1. Go to File > Manage Execution Environments and select Mac Installer. The eggplantAIagent.dmg file saves to your Downloads folder.
  2. Double-click to open eggplantAIagent.dmg.
  3. Drag eggplantAIagent.app into your Applications folder.

Python

  1. Go to File > Manage Execution Environments and select Raw Python. The eggplantAIagent.zip file is saved to your Downloads folder.
  2. Extract the eggplantAIagent.zip file. The extracted file contents are saved in a folder named eggplantAIagent.

Entering the Execution Environment Connection Details

You must configure the execution environment in Eggplant DAI before setting up the agent. You define execution environments on the New Execution Environment dialog box, which can be accessed from the File > Manage Execution Environments menu.

Adding a new execution environmnet in Eggplant DAI

The Execution Environments dialog box is divided into the following two sections:

General

This section is where you enter the information that is required for Eggplant DAI, through the agent, to connect to Eggplant Functional for automation.

  • Execution Environment: Enter a name to identify your execution environment when running tests in Eggplant DAI. This must be the same name you enter when setting up the agent, explained below.
  • Record data path: (Optional) Enter the full path to access the .CSV files for using with code snippets in the suite, e.g., for a .CSV file located on your desktop, enter C:\Users\Eggy\Desktop\.

Eggplant Performance

You need to enter information in this section only if you use Eggplant DAI to do performance testing with this agent

  • Test Controller/Analyzer server: Enter the host address.
  • Test Controller port: Specify the port number of the Test Controller server. By default, 5001 is entered when creating a new agent.
  • Analyzer port: Specify the port number of the Analyzer REST API server. By default, 5000 is entered when creating a new agent.
  • Workspace path: Specify a location to create a workspace in Eggplant Performance when a performance test is run.

Click OK on the New Execution Environment dialog box to save the execution environment configuration information.

Running the Agent Locally

You can launch the Eggplant AI agent from the Start menu on Windows or from the Applications folder on Mac. However, you must use the command line to run the raw Python agent. You can also run the agent from the command line without a UI.

Windows

Open Eggplant AI Agent from the Start menu. The Eggplant AI Agent login screen appears.

Mac

Launch the Eggplant AI Agent from the Applications folder. The Eggplant AI Agent login screen appears.

Python

To launch the Python agent, follow these steps:

  1. Open a command prompt and enter pip3 install -r requirements.txt from the extracted folder location. This installs the required dependencies to run the Python agent, as described in the README.md file packaged with the Eggplant DAI installer.
  2. Enter python3 agentgui.py and press Enter. The Agent GUI opens.

Note: For running the Python agent without the GUI, refer to installation instructions in the README.md file packaged with the Eggplant DAI installer. To invoke venv commands, refer to Python documentation. You must have installed all the Python packages that are listed as dependencies in the README.md file.

Configuring and Starting the Agent

Perform the following steps to configure, start the agent, and log in:

    Eggplant AI Agent Main screen

  1. Enter the connection details of the Eggplant DAI server to which you want to connect.
    • Server Host:The server address should be the same URL that you use to access the Eggplant DAI web app but without HTTP://, HTTPS://, or port number information.
    • Server Port: The port number you use to access Eggplant DAI.
    • SSL: Select this checkbox to enable SSL connections.
    • Access Token: Copy the Access Token from the Manage Execution Environments window in Eggplant DAI and paste it here.
  2. Click Login. The Eggplant AI Agent screen appears.
  3. Set up execution environment on the Agent dialog

  4. Enter connection information and preferences:
    • Connected to server: The address of the Eggplant DAI server you're connected to.
    • Execution Environment (previously Connection name): A name for the execution environment. This name must be the same name you enter when you connect a suite in Eggplant DAI.
    • Execution mode: Select your preferred mode of execution for the agent:
      • Design: To use while authoring the model, i.e., to execute tests started from the Designer (Capture) view and Eggplant AI UI only. The execution environments in your group are also visible in the Modeler UI.
      • Run: To use for executing scheduled and immediate test configuration runs from the Eggplant DAI Runner page.
      • The active agent appears highlighted in green in the Manage Execution Environments window.

        Copy the acess token

    • Eggplant Functional drive executable: The location of the runscript.bat file on your system, and an open port for connecting. The default port is 5400.
    • Start Eggplant Functional GUI: Clear this checkbox to run Eggplant Functional in drive mode.
    • Note: Don't select this checkbox if you're running the agent in Run execution mode, especially for running several tests via the Eggplant DAI GUI on an Execution Environment e.g., a scheduled run in Eggplant DAI > Runner tab. This is because continuous opening and closing of SUT connections may cause problems with Eggplant Functional.
    • Extra debug messages: When selected, displays more in-depth log messages.
    • Clean Eggplant Functional executables: When selected, clears binary executables if Eggplant Functional does not shut down properly.
  5. Click Start. Eggplant Functional opens, as does the command prompt.
  6. Note: Click Stop to stop the agent. Click Logout to go back to the Agent splash screen to connect to a different server.
  7. Click Choose to browse to and select the root folder that contains the Eggplant Functional suites and SenseTalk code snippets. See Manage Suites to learn how to upload and download subfolders in this directory.
  8. Set up execution environment on the Agent dialog

Managing Suites

Use the Suites section of the agent to upload and manage suites associated with your models. As soon as you upload your local suites to the remote folder, the state of suite version is updated. Suites uploaded to Eggplant DAI can be downloaded into another execution environment on a different computer, either automatically when running a scheduled test configuration, or manually if you wish to edit snippets or images in a suite.

New Feature: The Manage Suites button is available in Eggplant DAI 4.1 and later.

Prerequisite: Make sure you've set the root folder path to where all your Eggplant Functional suites are located as described in step 5 of the previous section.

Use manage suites to access your model assets

  • Suite: All suites that are available in your instance of Eggplant DAI are presented in the same format they appear in your Eggplant Functional Suites root folder. The suite status can also be interpreted by checking the icons displayed on the left:
    • Blue: Indicates the suite hasn't been uploaded.
    • Green: Indicates that both remote and local versions are up-to-date.
    • Amber: Indicates that the local and the remote versions don't match.
  • State: Displays the status of both the remote and the local suite versions, and reports if one of them is missing. No local version status displays if a local version is missing, and No remote version status displays if a remote suite folder is missing.
  • Local Version: The local version name of the suite folder.
  • Remote Version: The remote version name of the suite folder.
  • Remote Version Created At: The date and time at which the suite files were uploaded.
  • Remote Version Author: The username of the current user account.
  • Download button: Lets you download a local version of the selected suite. This button is enabled only if there are updated files available to download, i.e., if the remote suite folder is more up to date than the local version, or if a local suite folder is deleted but available on the remote.
    • Overwrite checkbox: Select this checkbox to discard any local changes and update the local suite to have the same up to date content as the remote suite. Leaving the box unchecked preserves local changes. Note that only files that haven't been modified locally will be updated to match the remote suite. You may wish to do this and then upload a new version with your local changes.
  • Upload button: Lets you upload a new suite to either remote. You'll be prompted to upload if you've made changes to your local files. This button is disabled if the selected suite is up to date in both local and remote locations.
    • Upload version: Specify a version name of your choice while uploading suites for ease of identifying them.

    Note: If a suite is uploaded without helper suites and modified later to refer to Helper suites, then you must follow this sequence when uploading Eggplant Functional suites that are dependent on helper suites:

    1. Delete the main suite that has a dependency on the helper suite.
    2. Add/Upload the helper suite.
    3. Upload the main suite back.
  • Updates panel: Shows which files have been added, updated, or deleted.

Eggplant DAI Agent FAQs

  • I get the following error when trying to upload my suite:
  • Make sure you have uploaded your helper suite first and then re-upload the main suite. Also, you must delete the main suite that has a dependency on the helper suite > upload the helper suite > re-upload the main suite. Uploading helper suites in this order will automatically create the dependency on the helper suite.

  • Where can I find the Eggplant DAI Agent log files?
  • The Agent log files are located here:

    Windows: %LOCALAPPDATA%\eggplant\agent\Logs

    Mac: ~Home\Library\Logs

 

This topic was last updated on May 29, 2020, at 11:42:09 AM.

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