The Settings tab consists of sections that provide information and let you set defaults for your suite. These sections are described below.
The Suite window showing the open Settings tab.
The Helper Suites section on the Setting tab contains a list of the suites whose scripts, images, and helpers are available to the current suite; such attached suites are known as helper suites. Helper suites are useful as core suites, with scripts and images that you use across several other suites.
The table shows the following information about each helper suite:
- Relationship: Shows how the helper suite is related to the current suite. This column displays either Includes if the current suite can access resources from the helper suite, or Included by if another suite accesses the current suite as a helper suite.
- Helper Suite: Displays the name of the attached helper suite.
- Path: Shows the file path of the helper suite; red text indicates a file path that is no longer valid.
Double-clicking a helper suite in the list opens that suite (or brings it to the front).
Adding, Creating, or Removing a Helper Suite
To add a helper to your suite, click the Add button and browse to select the suite you want to add.
To create a new helper suite, click the New button. In the New Test Suite window that open, name your new suite and decide where to save it.
To remove a helper suite, select it and click the Remove button. When you remove a helper suite, scripts in the current suite can no longer access that helper suite’s scripts, images, and other helper suites.
You can change the path of a helper suite to make it relative to your Home directory or your Default Suite Directory. To edit the path of the helper suite, select the helper suite in your Helper Suites pane and click in the path.
Paths that start with a tilde (~/) are relative to your Home directory. Paths that start with a dot (./) are relative to your Default Suite Directory.
For more information about using helpers, see Helpers.
The Utility Scripts section lets you declare pre-run and post-run scripts. You can also choose a script from the current suite to act as a template for all new scripts.
Setting Pre-Run and Post-Run Scripts
If you set a pre-run script, this script executes before every script run in the current suite. A post-run script executes at the conclusion of every script run.
You select pre-run and post-run scripts in the Utility Scripts section of the Settings tab. All the scripts in the suite are available to select from the drop-down list for both pre-run and post-run. Note that only scripts from the current suite are able to serve these functions.
The pre-run and post-run scripts have check boxes next to them. If you've defined these scripts for your suite but want to run a script without the pre-run or post-run script, you can clear the check box for that run.
Utility Scripts for Selections
You have separate options to apply pre-run and post-run scripts when you run only a selection of a script, rather than the entire script. Your choice or choices for selections will be run when you select a portion of your script code and use the Run Selection option.
Note that when you run a selection, only utility scripts for selections are used. Utility scripts set for whole script runs don't apply when you run selections of your code.
Using Pre-Run and Post-Run Scripts
A pre-run script is called with three parameters:
- The full path of the script that is about to be run.
- A list of all of the parameters (if any) that will be passed to the script about to be run.
- The full path to the log file that will be created during the script run.
You can use the pre-run script to change the parameters that are passed to the script. To do this, the pre-run script should return a property list with a "parameters" property whose value is a list of the parameters.
A post-run script is called with two parameters:
- The full path of the script that was run.
- The scriptResult property list for the run, which is similar to the result returned by the RunWithNewResults command.
In addition to the parameters and return values described above, pre-run and post-run scripts can interact with the script being run through a shared environment. For instance:
- Connections: If you open a connection in the pre-script, it will be the active connection when the script being run starts.
- Global and Universal Variables: These types of variables are common across all three scripts.
- Global Properties: These properties are common across all three scripts, including the InitialSuites and the FinalSuites properties.
Use as a Template for Every New Script
You can also specify a template script for new scripts in the Utility Scripts section of the Settings tab. If a template script is chosen, each new script that is created in that suite begins as a copy of that script.
All the scripts in the suite are available to select from the drop-down list as the template script for the suite. Note that only scripts from the current suite are able to serve as a template.
This Results Directory area shows the file path of the current suite's results. You can click the Browse button if you want to select a new directory in the file browser.
The Suite Variables section lets you define variables and set their values. These suite variables are available suite-wide to any script as well as to functions such as API testing. When used as SenseTalk variables, they can be considered a special, user-defined type of predefined variable. These variables are local in scope, but their values persist in the suite so that they are available across sessions.
For complete information about suite variables, see Creating and Using Suite Variables.
Scale Factors for Image Searches
When a script is run, the initial value of the scaleFactors global property is set to the value provided in the Scale Factors for Image Searches field on the suite's settings, which can be accessed by clicking Settings in the bottom left corner of the suite window. This field is given precedence over the scale of an image set in the Image Viewer but is overridden by the ScaleFactors global property and any Scale properties defined with images in-line in your script.
If the Scale Factors for Image Searches field is left blank, the scaleFactors global property will initially be empty, and the scale of the search will default to the scale set at the image level (typically 1). The scaleFactors property may be changed at any point during a script run, setting it to empty, a positive number, a list of positive numbers, a range of numbers, or a combination.
Examples:All of the below are valid entries in the Scale Factors for Image Searches field.
Suite Text Encoding Key
This key is used to encode text, such as passwords, that you use with the suite. The key is randomly generated by Eggplant Functional. If you want multiple suites to use the same key, you can copy the key to those suites.
This text field is a place for you to record your own notes about the current suite.