Integrating Eggplant Manager with Eggplant AI

You can use Eggplant Manager to schedule and run test executions using your Eggplant AI models.

Important: Eggplant AI integration is available in Eggplant Manager 6.4 and later. Note that Eggplant Manager 6.43 is not compatible with Eggplant AI versions older than 3.0. Versions of Eggplant Manager older than 6.43 are not compatible with Eggplant AI 3.0.

To use this functionality, the command line version of the Eggplant AI Agent must be installed on the same machine as the Eggplant Manager agent. Eggplant Functional must also be installed on that machine. When a test execution begins, the Eggplant Manager agent launches the Eggplant AI agent, which enables the use of Eggplant Functional snippets in that test execution.

Configure Eggplant Manager

In order to use Eggplant Manager to manage Eggplant AI test runs, several settings must be configured.

System Preferences

A user with administrative privileges must add the base URL of the Eggplant AI server you want to access to Eggplant Manager:

  1. Go to Admin > System Preferences, then scroll to the Eggplant AI pane.
  2. Enter the base URL of the Eggplant AI server. This is the URL you use to access Eggplant AI in a web browser.
  3. Click Save Changes.

Account Settings

Enter the username and password you use to access Eggplant AI in your Eggplant Manager account settings:

  1. In the upper right corner of the Eggplant Manager UI, click your user name, then select Account Settings.
  2. In the Eggplant AI Setup pane, enter the username and password you use with Eggplant AI.
  3. Click Save.

Note that while you can't edit an Eggplant AI model that was created by another user, you can view the results of any Eggplant AI test execution run from Eggplant Manager.

Repositories

Make sure you have a connection to a repository that contains the Eggplant Functional snippets used in your Eggplant AI testing.

Step by Step: Create a Test

After you've configured Eggplant Manager to have access to Eggplant AI and the repository that contains the required Eggplant Functional snippets, you can configure a test.

  1. Go to Tests > New Test. The New Test window opens.

    The New Test window in Eggplant Manager

  2. Enter information about the test:
    • Name: Enter a name for the test here. This field is required.
    • Version: Specify a version number for the test.
    • TestGroup: Specify or create a test group. Test groups can be used to organize testing and results.
    • Active: This setting determines if a test can be run by a schedule; it is selected by default. Clear this checkbox to make a test inactive. When a test is inactive, it won't run based on any schedules you have defined for it; however, you can still run the test on demand. For information about schedules and running tests on demand, see Running Eggplant Manager Tests.
    • Description: Enter a description for this test.
    • Agent: Choose an agent to run the test. All the agents defined on the Agents page (Admin > Agents) appear in the drop-down list. The default value is Auto, which lets Eggplant Manager choose one or more agents based on their current availability and concurrency settings. If you choose a specific agent, only that agent can run the test. For information about agents, see Working with Agents.
      Note: When running tests, the agent you configure when Creating a Schedule or Running Tests on Demand takes precedence over the agent you set here.
    • SUT: You can specify a SUT here for the test to run on. However, you can also specify SUTs on individual scripts and on schedules; for information about which SUT setting takes precedence, see SUT Priority for Eggplant Manager Tests. Any script in this test runs against the SUT specified here unless it has a SUT specified at a higher order of precedence.
    • App: Specify an app to test, if desired. All the apps you have defined on the App Management page (Admin > App Management) are available in the drop-down list. The default is None.
    • Arguments: Add any Eggplant Functional command-line argument options that you want passed to your test. You can use any command-line argument that Eggplant Functional accepts; you can find the list of options on the Eggplant Command Line Options page and the Runscript Command Line Options page.
    • Stop on Failure: Selecting this checkbox causes the test to stop if any of its scripts fail.
    • Timeout: Select a maximum execution time for the test, in minutes. If the test is still running after this amount of time has passed, the test will be aborted by the system. Note that the abort process can take a few minutes.
    • Notification Email: Add an email address for Eggplant Manager to send notifications to regarding completions of runs for this test.
      Note: Email notifications from Eggplant Manager require administrative setup. See Mail (SMTP) Server Configuration for more information.
    • Report: If there is a specific report affected by this test, you can optionally add that report name here. The Eggplant Manager application attaches a copy of this report to the notification email address. See Creating Custom Reports in Eggplant Manager for more information about creating custom reports.
    • Completed Notification URL: Add a URL that triggers a test or activity in a different environment after this test completes. For example, you might have a Jenkins task you want to start following the completion of the test run in Eggplant Manager.
    • HTTP Method: Select either GET or POST from the drop-down list for how the Completed Notification URL gets called.
  3. Click Create. The main Eggplant Manager screen changes to the context of the new test.
  4. Next, define the script for the test. In the Scripts pane, click New Script. The New Script window opens.

    The New Script window in Eggplant Manager

  5. Select the Eggplant AI model to run from the Eggplant AI folder at the left side of the window. This model name displays in the Selected Script field at the right side of the window.
  6. In the AI Suite field at the right side of the window, enter the path to the Eggplant Functional suite that contains the snippets used in the Eggplant AI model from step 5. All of the other fields are optional. The fields are:
    • Selected Script: This field is not editable. It shows you the script, table, schedule, or other executable you selected from the file view on the left. You must select an executable before the save buttons (described below) become active.
    • Execution Type: This field is not editable. It shows you the type of executable you have selected.
    • SUT: Specify a SUT that the script will execute against. SUTs you have defined in the Admin section of Eggplant Manager (Admin > SUTs) are available in the drop-down list. Default is None. However, a SUT can be specified on a schedule or at the test level as well; see SUT Priority for Eggplant Manager Tests for complete information about which SUT specification takes priority.
      Note: Both fixed SUTs and rule-based SUTs show in the list of options. Remember, however, that with rule-based SUTs, the specific SUT isn't chosen until runtime, based on the criteria set in the SUT setup. If your test needs to run against a specific SUT, be sure to select the specific SUT rather than using the rule-based option.
    • App: Specify an app to test. Apps you have defined in the Admin section of Eggplant Manager (Admin > App Management) are available in the drop-down list. Default is None.
    • Last Checkout: This field is not editable. It shows the date of the last checkout for this script or table. See step 5 below to read about checking out scripts and executables.
    • Update Each Execution: Select this checkbox to check out the script before each execution. To read about checking out scripts, see step 5 below. This option is selected by default.
      Note: If you are using more than one script in your test, make sure that all of those scripts are set the same (either to update or not to update) to prevent resource allocation problems.
    • Active: Scripts are active by default. You can clear this checkbox to make the script inactive. If a script is inactive, it won't run when the rest of the test does; however, any scripts in the test that are active still run.
    • AI Suite: Required. Select the Eggplant Functional suite that contains the snippets used in your Eggplant AI model.
    • AI Group: This field can't be edited, and automatically populates with the name of the group that the selected Eggplant AI model belongs to. See Eggplant AI Administration to learn more about groups.
    • AI Test Case: Optional. If the Eggplant AI model you've selected contains defined test cases, you can choose one to run from this drop-down menu. See Using Eggplant AI Test Cases to learn more about test cases.

    • Always Run: Cleared by default. When selected, the script will always run, even if the test has Stop on Failure enabled and a previous script in the test fails.
    • Description: Optional. Add information about the script.
  7. You have two options when saving the executable:
    • Save: This option adds the script to the test, but does not get the latest version of the script until it needs to run a test.
    • Save and Checkout: This option adds the script to the test and gets the latest version of that script from the repository at the same time.
    Note: Save and Checkout is recommended when first adding an executable to a test. The latest version of the executable is fetched from the repository with each test run if you select the Update Each Execution option.

Now, you can run the test. See Running Tests in Eggplant Manager for details. After the test runs, you can view execution-level results in Eggplant Manager. The Run ID number corresponds to the Test ID in the Eggplant AI Run Report, where you can view full test results.

Viewing Eggplant AI test results in Eggplant Manager. Click image to view larger.

Troubleshooting Eggplant AI Configuration Problems

If Eggplant Manager can't validate user or model information when running a test that uses Eggplant AI, the test run ends and the overall test status reads Validation Failed.

The results for this Eggplant AI test show a Validation Failed status. Click image to view larger

The test report page shows more details about the specific failure in the Warnings section. The position number (highlighted in the above image) shown in some of these warnings refers to the Order column of the Scripts table on the main Test page. The Eggplant AI–specific warnings are:

  • EaiCredentialValidationFailed: This error can appear if a user's Eggplant AI password has changed since the model was added to the Eggplant Manager test. To fix the problem, update the user's credentials in the Eggplant AI Setup section of the Eggplant Manager Account Settings page.
  • EaiModelGroupValidationFailed: This error can appear if a model has been renamed or the model group is changed in Eggplant AI after that model is added to the Eggplant Manager test. To fix the problem, you can edit the script and re-select the model from the list of models, or you can remove the script from the Scripts table on the Test page.
  • EaiTestCaseValidationFailed: This error can appear when a test case name is chosen on the Edit Script or New Script window in Eggplant Manager and that test case is subsequently removed or renamed in Eggplant AI. To fix the problem, edit the indicated script and either update or remove the test case name from the AI Test Case field.

 

This topic was last updated on August 19, 2021, at 03:30:51 PM.

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