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.
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.
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:
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.
- Go to File > Manage Execution Environments and select Windows Installer. The eggplantAIagent.exe file is saved to your Downloads folder.
- Open eggplantAIagent.exe, then follow the prompts to complete the installation. The installer saves a shortcut to Eggplant AI Agent on the Start menu.
- Go to File > Manage Execution Environments and select Mac Installer. The eggplantAIagent.dmg file saves to your Downloads folder.
- Double-click to open eggplantAIagent.dmg.
- Drag eggplantAIagent.app into your Applications folder.
- Go to File > Manage Execution Environments and select Raw Python. The eggplantAIagent.zip file is saved to your Downloads folder.
- Extract the eggplantAIagent.zip file. The extracted file contents are saved in a folder named eggplantAIagent.
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.
The Execution Environments dialog box is divided into the following two sections:
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\.
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.
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.
Open Eggplant AI Agent from the Start menu. The Eggplant AI Agent login screen appears.
Launch the Eggplant AI Agent from the Applications folder. The Eggplant AI Agent login screen appears.
To launch the Python agent, follow these steps:
- 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.
- 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.
Perform the following steps to configure, start the agent, and log in:
- 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.
- Click Login. The Eggplant AI Agent screen appears.
- 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.
- 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.
- 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.
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.
- 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:
- Delete the main suite that has a dependency on the helper suite.
- Add/Upload the helper suite.
- Upload the main suite back.
- Updates panel: Shows which files have been added, updated, or deleted.
- I get the following error when trying to upload my suite:
- Where can I find the Eggplant DAI Agent log files?
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.
The Agent log files are located here: