Working with Test Configurations in Eggplant Manager

For some tests, you might want to run your scripts against multiple systems under test (SUTs) or run them multiple times with different parameters. In Eggplant Manager, you can use configurations for this type of testing.

A configuration is essentially a profile that you define for a specific testing circumstance. You can then apply the configuration to different tests or schedules. You access configurations by clicking the Configurations tab on the main Eggplant Manager menu. The Configurations page lists your defined configurations and lets you create configurations and edit existing configurations.

Running Tests with Configurations

When you run a test with a configuration, Eggplant Manager attempts to run a complete iteration of the test for each line in the configuration definition; that is, each line in the configuration is an instance you want to run. So, for example, if your test consists of four scripts, when you run with a configuration, Eggplant Manager attempts to run all four scripts against each instance in your configuration.

You can create as many instances within a configuration as you need. Each instance in a configuration definition can include a specification for a SUT, Eggplant Functional command-line arguments, and script parameters. Each of these settings is optional, allowing you to customize each instance for your testing needs by specifying only the pieces that matter to you.

Using Parameters with Configurations

One way of customizing tests through configurations is to pass different parameters in different instances of a configuration. There are some special circumstances you need to be aware of when using parameters in configurations.

If you want to pass multiple parameters, use a blank space as the separator. To pass a parameter that includes a space, enclose the parameter in quotes. For example:

lazy dog

passes two parameters, lazy and dog.

"lazy dog"

passes one parameter, lazy dog, as a single string.

You can pass parameters to multiple scripts within your test. However, note that each script with a params declaration reads the entire lists of parameters (provided the params declaration includes a sufficient number of parameters), and each script reads the parameters in the order they are listed in your configuration definition.

For example, say you have a test that includes two different scripts, and you want the second script to receive the second parameter. That second script needs to include a parameter declaration that has two parameters, even though the script otherwise ignores the first one.

For information about using parameters with Eggplant Functional scripts, see Parameters and Results.

Step by Step: Creating Configurations

Use the following steps to create configurations in Eggplant Manager.

  1. Click the Configurations tab to navigate to the Configurations page.
  2. Click New Configuration.
  3. Enter a Name and (optional) Description for the configuration. This information helps you identify this configuration and its purpose and is displayed in the list on the main Configurations page.

    Defining test configurations for Eggplant Manager

    Defining test configurations for Eggplant Manager. Click image to view larger.

  4. Enter the details for the instance that you want the test to run. Your options are:
    • SUT: Choose a SUT from the drop-down list.
    • App: Choose an app from the drop-down list. The app will be installed at runtime.
    • Arguments: Enter Eggplant Functional command-line arguments.
    • Parameters: Enter script parameters.
    Note: Each of these values is optional; that is, you don't have to assign a value. You can create an instance that doesn't have any values specified, in which case that instance takes its values from the script definition, schedule definition, or test definition, whichever is appropriate.
  5. To add an additional instance, click Add Instance.
  6. Repeat steps 4 and 5 to add the number of instances you want to include in the configuration.
    Eggplant Manager configurations can contain multiple instances to test different scenarios

    A test configuration with four instances defined

  7. Run with Best Effort: Select this checkbox if you want the test to run with any available SUTs even if all SUTs in the configuration aren't available when the test begins. You will receive a warning about any unavailable SUTs, but the test proceeds as expected on SUTs that are available. The default is to not use this setting, which means that the test will fail with a SUT allocation error if any of the specified SUTs are unavailable when the test begins.
  8. Click Save to save the configuration.

The new configuration is added to the list on the Configurations page, which displays the name and description for each defined configuration.

To edit an existing configuration, select it in the list on the Configurations page and click Edit Configuration, or double-click it in the list. The edit screen provides the same options as when creating a new configuration. To delete a configuration, select it in the list and click Remove Configuration.

 

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