Skip to main content
Version: DAI 7.2

Working with Test Configurations

A test configuration is a collection of tests that can be run on demand or be scheduled to run on a regular basis in Eggplant DAI. A test configuration ("test config") is essentially a blueprint of tests that can be run one after the other. You can run directed test cases and model-based exploratory tests in a test config. See About Test Cases for more information about test cases.

Go to Controller > Test Config, to create, edit, or view your defined test configs.

Test Config pages

The following columns are displayed to provide at-a-glance details about each test configuration:

  • Name: Display name of the test configuration.
  • Model/Suite: Name of the model or suite depending on the type of test configuration you choose to run.
  • Description: Description of the test configuration. Provide a meaningful description to help distinguish it from other test configurations.
  • Tags: Tags defined for the selected test configuration that you're viewing.
  • SUT: Associated SUT, or criteria for choosing a SUT for the test configuration.
  • Updated: Date and time when the test configuration was last updated.
  • Steps: Number of test steps included in the test configuration. A test step is either a test case from the model or a script based test case, or an exploratory test with stop criteria, which could be defined by duration, iterations, or a target coverage percentage.

Click the Actions Actions menu icon menu to Edit, Delete, or Duplicate a test configuration.

Filtering Test Configurations

You can filter test configurations in the following ways:

  • By name: Type part of a test configuration name in the Search by name search bar. DAI filters the test configurations you see as you type.
  • By model: If you want to see the test configurations associated with a model, click the arrow on the Models button and select a model from the suggested list or start typing a model name in the Search... field. DAI suggests models as you type.
  • By suite: If you want to see the list of test configurations associated with a suite, click the arrow on the Suites button and and select a suite from the suggested list or start typing a suite name in the Search... field. DAI suggests suites as you type.

Creating Test Configurations

Go to Controller > Test Config to create a test configuration ("test config").

Step by Step: Creating a Test Configuration

Creating a test config consists of three steps, with a page for each step. The steps and pages are summarized below, followed by detailed instructions:

  • Step 1: General: the page where you provide the general information about your test config, including a name, description, test type, test config tags, execution settings, and SUT.
  • Step 2: Steps/actions: the page where you configure the exploratory test or test case actions you want your test config to run.
  • Step 3: Advanced Settings: the page where you can configure if you want to automatically rerun failed test steps and set up email notifications to advise of completed test configuration runs.

A progress tracker at the top of the page shows where you are in the creation process as shown in the image below. The highlighted number in purple shows the step you are on in the process. Once you finish entering information on a page and advance to the next one, the progress tracker shows a green check for completed the step.

The pages include Cancel and Back buttons so you can cancel the test config creation or return to a previous page when you want.

Create Test Config Basic Settings

note

Providing a name and test type enables additional settings.

Step 1: Configure the General information for the Test Configuration

  1. Go to Controller > Test Config. The Test Configs page opens.

  2. On the right side of the top menu, click + New Test Config. The Create new Test Config page opens with the first step in the process, the General page shown above, where you provide the Basic Settings for your test config.

  3. Provide a Name and Description for the test configuration. This is the name and description that show in the list of test configs. Also note the Clear all button you can use to clear the Description field.

  4. Select a Test type (Model based or Script based) for the test configuration. After you specify the test type, more settings become visible. Some of the options you see depend on the test type selected. For both test types, you see the Test configuration tags and Execution settings selectors.

    • If you selected the Model based test type, you see the Model selector.

      Basic Settings Model Selector

    • If you selected the Script based test type, you see the Suites selector so you can select the suite that contains the scripts/snippets you want your test config to run.

      Basic Settings Suites Selector

  5. Select the model or suite from the selector as appropriate for your test type.

    note

    Note that selecting your model or suite enables the Next button at the bottom of the page. You can proceed to the Steps/actions page at this point with the default values for the remaining settings on this page.

  6. Add or select Test configuration tags by entering a name for the tag and pressing Enter. Tags provide another way for you to identify and filter by your test config. You can add as many test tags as you need. You can also clear the list of selected tags by pressing the Clear all button.

    Basic Settings Tag Selector

  7. In the Execution settings section of the page, select the type of execution environment (Local or Cloud) that you want your test config to use.

  8. Select a SUT option for this test config that is appropriate for your execution environment as follows:

    For Local execution environments, choose from the following SUTs:

    • None (no SUT) if the SUT is defined in your code or not required.

    • SUT by name to select a predefined SUT.

      Basic Settings Select Local SUT by name

    • SUT by criteria tag to select a SUT tag from the drop-down list. The SUT tag is associated with a SUT that is available on the SUTs page (Controller > SUTs). If you want to create a SUT or SUT tag, navigate to the SUTs page.

      Basic Settings Select Local SUT by tag

    For Cloud execution environments, choose from the following SUTs:

    • The same options listed above for Local execution environments.

    • Eggplant hosted cloud: Select this to execute tests on Cloud SUTs where Eggplant will provision the Cloud Execution Environment (including the Agent and Eggplant Functional) for you. For more information, see Connecting to DAI Cloud SUTs. (This option is only available for cloud SUTs.)

  9. When you finish configuring the Basic Settings, click Next. You advance to the second part of the test configuration creation process: the Step 2: Test steps/actions page.

Step 2: Configure the Steps/actions for the Test Configuration

The options you see on the Steps/actions page depend on the test type you selected. The top of the page shows the test type you selected (Model based or Script based) and either the model or suite as appropriate for the test type. Follow the appropriate steps below for your test type:

Configuring steps/actions for Model based test types

For Model based test types, you see the Available exploratory and test cases selector. Clicking the selector button gives you the option to add an exploratory test (Add Exploratory) and lists the available test cases for your model.

Steps/actions test case selector

  1. Select to add an exploratory test or test case from the Available exploratory and test cases selector. What you see added to the Steps added list on the right side of the page depends on the type of test you select:

    • For exploratory tests, you see exploratory test options where you can specify the number of Iterations, Coverage, and Time (hrs) as shown below.

      Steps/actions Exploratory test step

      note

      For exploratory steps, a stop criterion is always set by duration, iterations, or target coverage. After the test runs out of steps, Eggplant DAI will examine the execution of each step and indicate whether the test configuration is a success or failure.

    • For test cases, you see the test case.

      Steps/actions test case steps

  2. Repeat step 1 above until you have added all the tests you want your test config to run.

  3. Click Next to advance to Step 3: Advanced Settings page and follow the instructions for that page.

Configuring steps/actions for Script based test types

For Script based test types, you see the Select a Scripted Test Case selector. Clicking the selector button lists the available scripted test cases and displays a Search... bar so you can search for them by name when you have a long list of test cases.

Steps/actions script-based test case selector

  1. Select a scripted test case from the list or search for it by name in the search bar and then select it. You see the test case added to the Steps added list on the right.

  2. Repeat step 1 above until you have added all of the scripted test cases you want your test config to run.

  3. Click Next to advance to the Step 3: Advanced settings page and continue to the following section for information about configuring it.

Step 3: Configure Advanced settings for the Test Configuration

Advanced settings

When you reach the Advanced settings page, you have the following options:

  • If you want to create your test config, click the Create test config button. See Finish Creating a Test Config for more information.

  • If you want to enable automatic reruns of failed and errored test steps for your test config, click the slider next to Automatically rerun failed and errored test steps. See Enabling Reruns for an explanation of how to configure DAI to rerun your test config.

  • If you want to enable email notifications and advise of completed test configuration runs, click Manage notifications ->. The notification settings page opens:

    Notification settings

    Select the users you want to receive notifications in the Recipients box and select the status(es) you want the recipients to be notified about.

    See Finish Creating a Test Config below to finish creating your test config.

Finish Creating a Test Config

When you finish creating your test config, click the Create test config button in the lower-right corner. DAI saves your new test config and the Test Configs page opens. The new test config will be in the list but you may need to scroll or search for it to see it.

Enabling Reruns

Advanced Settings Automated Reruns enabled

The rerun feature allows you to save time and effort by automatically rerunning failed and errored test steps up to 50 times without executing the entire test configuration. A test step can be a model based test case, a script based test case, or an exploratory test.

To activate the rerun functionality for failed or errored test steps:

  1. Enable reruns by sliding the Automatically rerun failed and errored test steps toggle to the right. (A green check indicates the option is enabled.)

  2. Configure the rerun parameters with the following controls:

    • Number of Runs: Specify the maximum rerun count for failed and errored test steps. You can adjust this value using the text box or slider, with a maximum of 50 reruns.
    • Wait Duration: Define the interval between each rerun, optimizing the rerun process. Choose a time interval from the dropdown list, measured in seconds. The default is set to zero, implying no wait interval.

This streamlined process allows you to effectively manage reruns, enhancing your testing workflow.

note
  • The chosen rerun count and wait duration will be saved even if you deactivate the rerun feature. This way, you can easily re-enable it at a later time without reconfiguring.
  • Access rerun statistics by viewing the total reruns completed under the Controller menu on the Runner page. Expand individual test results to find this information.

Rerun stats

Running a Test Configuration

You can run a test configuration from Controller > Runner by clicking Play button icon against the test you want to run.

Go to Controller > Runner to configure test schedules with specific frequencies to be run at regular intervals. You can only have one schedule per test configuration.

tip

Remember to always associate suites to a model before running tests.

note

When you abort a test run that is part of a test configuration schedule, all runs that are part of that configuration schedule are aborted.

Eggplant Functional Stop and Restart Settings for Test Configuration Runs

When running a test configuration, you can configure the length of time to run Eggplant Functional (EPF) before restarting or the grace periods for poll-time stopping and restarting with the following environment variables:

Environment VariablesDefaultDescription
RESTART_EPF_AFTER_SECONDS1800The period from when EPF launches until the next EPF restart. This variable takes effect after the current step finishes and before moving to the next. It only applies to test configurations run with the DAI Run Agent. During live runs, EPF runs continuously without restarting. Default: 30 minutes.
EPF_QUIT_POLL_TIME_SECONDS20The grace period for EPF to quit during the restart process.
EPF_RESTART_POLL_TIME_SECONDS120The grace period for EPF to start up after having quit. EPF_RESTART_POLL_TIME_SECONDS does not include EPF_QUIT_POLL_TIME_SECONDS.

Viewing, Editing and Notification Settings of an Existing Test Configuration

To view or edit a test configuration:

  1. Go to Controller > Test Config.
  2. Find the test configuration that you're interested in updating or viewing, then from the Actions menu icon Actions menu, select Edit.
  3. From here you can view or update the test configuration details.
  4. Furthermore, you can also manage the notification settings of the test configuration by clicking on link.

Notification Settings of an Existing Test Configuration

Important

Test Configuration notifications must be enabled globally before you can set up notifications for a specific Test Configuration within DAI. You need to be an administrator to do this. See Manage DAI Settings for details.

By default, the notification feature for all Test Configurations is disabled. To enable it, follow these steps:

  1. Go to Controller > Test Config.
  2. Find the test configuration that you're interested in, then from the Actions menu icon Actions menu, select Edit.
  3. Click on link.
  4. From here, you can enable / disable the feature and assign verified users to receive the notifications.
  5. Besides, you can also manage the Notification type you wish to receive by selecting from the various options.
  6. These are the rules for Recipients:
    • If the feature is enabled, then you have to pick at least one recipient before you are allowed to save.
    • If the feature is disabled, then you can leave the field blank and save.
  7. These are the rules for Notification type:
    • If the feature is enabled and you uncheck all checkboxes, the feature will toggle to the disabled status.
    • If the feature is disabled and all checkboxes are unchecked, when you toggle to enable the feature, all checkboxes will be checked by default.

Removing a Test Configuration

To remove an existing test configuration:

  1. Go to Controller > Test Config.
  2. Find the test configuration that you want to delete, then from the Actions menu icon Actions menu, select Delete.
  3. From here you can view or update the test configuration details.

Duplicating an Existing Test Configuration

To duplicate an existing test configuration:

  1. Go to Controller > Test Config.
  2. Find the test configuration that you want to duplicate, then from the Actions menu icon Actions menu, select Duplicate.
  3. From here, you will be required to enter a new name for the Test Config.
  4. Click Create once a valid name is entered.
  5. From here, you will be able to edit your newly-duplicated Test Config.
Tips
  • Make sure to avoid entering the same name as the Test Config that is to be duplicated.
  • The new name has to follow these rules:
    1. 2 to 100 alphanumeric characters.
    2. Space and dashes are accepted, however they cannot be used at the start or end of the name, only between other alphanumeric values.
    3. No other special characters are allowed.
  • Examples of acceptable names:
    1. New Test Config
    2. New-Test-Config
    3. New-Test
    4. New Test 2