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. The execution environment 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 a program that provides an execution environment, by establishing a connection between Eggplant DAI web application and Eggplant Functional. The execution environment name you enter in the Execution Environment dialog box can be used within 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. 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 Agents 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.

Configuring and Running the Agent Locally

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

Windows

  1. Open Eggplant AI Agent from the Start menu.
  2. Enter connection information and preferences:
    • 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.
    • Server address: The location of the Eggplant DAI server to which you want to connect.
      Note: You must add the port number to the server address in the end (e.g., :8000), or the agent will not be able to connect.
    • Execution mode: Select your preferred mode of execution for the agent:
      • Run: To use for executing scheduled and immediate test configuration runs from the Eggplant DAI Runner page.
      • 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.

      Depending on the execution mode selected in the Agent window, the active agent appears highlighted in green in the Manage Execution Environments window.

    • 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. Click Exit to close the agent and 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:
    • Execution Environment: A name for the execution environment. This must be the same name you enter when you connect a suite in Eggplant DAI.
    • Server address: The location of the Eggplant DAI server to which you want to connect.
      Note: If you have configured the Eggplant DAI server to run on a port other than 8000, 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 8000, enter 10.90.101.225:8000.
    • Execution mode: Select your preferred mode of execution for the agent:
      • Run: To use for executing scheduled and immediate test configuration runs from the Eggplant DAI Runner page.
      • Design: To use while authoring the model, i.e., to execute tests started from the Designer (Capture view) and Eggplant DAI UI only. The execution environments in your group are also visible in the Modeler UI.
    • 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.
    • Start Eggplant Functional GUI: Select to run 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.
    • 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. Click Exit to close the agent, and to save any changes you make to agent settings.

Python

You must have installed all the Python packages that are listed as dependencies in the README.md file (packaged with the Eggplant DAI installer).

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.
  2. Enter python3 agentgui.py and press Enter. The Agent GUI opens.

Note: For running the Python agent via non-GUI mode, refer to installation instructions in the README.md file packaged with the installer. To invoke venv commands, refer to Python documentation.

Entering Execution Environment Connection Details in Eggplant DAI

After you install and set up the agent, you must enter information about the execution environment in Eggplant DAI. You define execution environments on the New Execution Environment dialog box, which you access from the Manage Execution Environments window (File > Manage Execution Environments).

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 the same name you entered in the agent application Execution Environment field.
  • Suite root folder: Specify the Eggplant Functional suite folder path that contains the SenseTalk code snippets you want to use. This path is used along with the Eggplant Functional suite location to define where the suites are located relative to the location of the execution environment. The Suite relative location can be specified in the Snippets tab.
  • Record data path: (Optional) Enter a full path to access the .CSV files for using with code snippets in the suite.
    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.

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 Eggplant DAI Agent in command line mode

To configure and run the execution environment (agent) from the command line (without the interface), follow these steps:

  • In a command prompt window, change the default directory to read the agent folder location followed by eggplantAIagentCMD.exe, and then press Enter. For e.g., C:\Program Files (x86)>eggplantAIagent\eggplantAIagentCMD.exe.
  • You can also use from any of the optional arguments listed below:
  • Optional arguments:
    -h, --help Show the help message and exit.
    -s SERVER, --server SERVER

    The server e.g., "server.mycompany.com".

    Default = eggplantai.testplant.com

    -p PORT, --port PORT

    The port to run Eggplant Functional drive on

    Default = 5400

    -e DRIVEEXEC, --driveExec DRIVEEXEC

    The location of the Eggplant Functional drive

    Executable default = C:/Program Files/eggPlant/eggplant.bat

    -n NAME, --name NAME

    A name for the agent connection to be used in Eggplant AI settings. If unspecified an IP address will be used.

    --ssl Use ssl connection to server (Default).
    --no-ssl Don't use ssl connection to server.
    --epfgui

    Start the Eggplant Functional GUI.

    --no-epfgui Don't start the Eggplant Functional GUI (Default).
    --debug Run the agent in debug mode (more messaging).
    --clean-epf

    Kill any struggling Eggplant Functional processes before starting new.

    --no-start-epf

    Don't start Eggplant Functional; expect it to be already running on the specified port.
    --design-mode

    Connect to the server as a Design execution environment. By default, this is set to Run mode.

 

This topic was last updated on March 17, 2020, at 03:45:44 PM.

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