Configuring the Eggplant AI Agent

A model in Eggplant AI 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. The Eggplant AI agent manages the interaction between Eggplant AI and Eggplant Functional.

What Is the Agent?

The agent is a program that establishes a connection between the browser-based Eggplant AI web application and an Eggplant Functional suite. When the agent connection is active, you can attach SenseTalk snippets to actions and states in the Eggplant AI model. Running the model then executes the SenseTalk snippets on the SUT and reports the results to the console in Eggplant AI.

You can access the Eggplant AI server from any connected machine on your network with a supported browser. The agent can run on the same machine on which you run Eggplant AI, or on a hosted machine. All agent connections in your group are visible in the Eggplant AI interface.

Downloading and Installing the Agent

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

Open the Mange Agents window in Eggplant AI to download an agent for your platform

Download and manage Eggplant AI agents from the Manage Agents window

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

Windows

  1. Go to File > Manage Agents and select Windows Installer. The eggplantAIagent.exe file saves to your Downloads folder.
  2. Open eggplantAIagent.exe, then follow the prompts to complete the installation. The installer saves a shortcut to eggplantAIagent on your desktop.

Mac

  1. Go to File > Manage Agents 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 Agents and select Raw Python. The eggplantAIagent.zip file saves to your Downloads folder.

Configuring and Running the Agent Locally

You can launch the Eggplant AI agent from the desktop shortcut on Windows or from the Applications folder on Mac. You must use the command line to run the raw Python agent.

Windows

  1. Double-click the desktop shortcut. The Eggplant AI Agent GUI opens.

    The Eggplant AI agent window on Windows

  2. Enter connection information and preferences:
    • Connection name: A name, of your choosing, for your connection. This name must be the same name you enter when you connect a suite to a model in Eggplant AI.
    • Server address: The location of the Eggplant AI server to which you want to connect.
      Note: If you have configured the Eggplant AI server to run on a port other than 80, you must add that port number to the server address or the agent will not be able to connect. For example, to use the server address in the screenshot above with port 81, enter 34.248.117.57:81.
    • 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.
    • SSL: Selected by default. Clear this checkbox if the Eggplant AI agent can't connect to Eggplant Functional.
    • Start Eggplant Functional GUI: Clear this checkbox to run Eggplant Functional in drive mode.
    • 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.
  3. Click Start. Eggplant Functional opens, as does the command prompt.
Note: Click Stop to stop the agent, close Eggplant Functional, and close the command prompt. Click Exit to stop and close the agent, close Eggplant Functional, and close the command prompt.

Mac

  1. Double-click the eggplantAIagent icon in the Applications folder. The Eggplant AI Agent GUI opens.

    The Eggplant AI Agent window on Mac

  2. Enter connection information and preferences:
    • Connection name: A name, of your choosing, for your connection. This must be the same name you enter when you connect a suite to a model in Eggplant AI.
    • Server address: The location of the Eggplant AI server to which you want to connect.
      Note: If you have configured the Eggplant AI server to run on a port other than 80, you must add that port number to the server address or the agent will not be able to connect. For example, to use the server address in the screenshot above with port 81, enter 34.248.117.57:81.
    • Eggplant Functional drive executable: The location of runscript on your system. Leave this field blank unless the Eggplant Functional executable isn't in the default location on your machine.
    • Port: An open port for connections. The default port is 5400.
    • SSL: Selected by default. Clear this checkbox if the Eggplant AI Agent can't connect to Eggplant Functional.
    • Start Eggplant Functional GUI: Clear this checkbox to run Eggplant Functional in drive mode.
    • 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.
  3. Click Start. Eggplant Functional opens.
Note: Click Stop to stop the agent and close Eggplant Functional. Click Exit to stop and close the agent, to close Eggplant Functional, and to save any changes you make to agent settings. Changes are not saved if you close the agent from the eggPlantAIagent menu or by clicking the x to close the agent window.

Python

You must have the Python packages websocket-client and psutil installed via pip.

  1. Open the command prompt and enter python eggplantAIagent.zip –s eggplantai.testplant.com –-name <Connection name>
  2. If you need help with the Python agent, enter python eggplantAIagent.zip –-help in the command line.

Entering Agent Connection Details in Eggplant AI

After you install and set up the agent, you must enter information about the agent into Eggplant AI itself.

  1. Go to File > Manage Agents.
  2. Click New Agent. The New Agent window opens.

    The New Agent window in Eggplant AI

  3. Enter the Connection name. This information needs to match the name you entered in the agent application.
  4. Specify the Eggplant Functional suite location. This information needs to be the full path to the suite (the .suite file) that contains the SenseTalk code snippets to use with the model.
  5. (Optional) Enter a Record data path. This information is a full path to any external data files that are required by the code snippets in the suite. You can include multiple file paths in the field by using the pipe character (|) as a separator.
    Note: As a best practice, any files referenced within a SenseTalk script should be added to Eggplant Functional through the Resources pane in the Suite window. This method stores files to the Resources directory within the suite directory for the given suite. Although SenseTalk can access files stored elsewhere on the local file system, using the Resources directory provides additional capabilities. See the Resources Pane for more information.

 

This topic was last updated on December 04, 2018, at 12:08:36 PM.

Eggplant icon Eggplant.io | Documentation Home | User Forums | Support | Copyright © 2018 Eggplant