Model Parameter Settings
DAI supports the use of State, Action, and Global parameters in its models. You can find detailed information about the DAI parameter setting options below.
We recommend reading Overview of Using Parameters in DAI Models and Managing and Overriding Parameters to be sure you understand the scope of the different model parameters, as well as how and where to use them before you read about the different parameter settings described below.
DAI supports the following types of model parameter values: numbers, text, true or false (and other Boolean values), a set of allowed values, or even the location of a file from which a value can be randomly selected when a test runs. The tables below provide details about the different types of supported parameter values.
Except for the Group value parameter options, all the parameter settings listed below can be set in the Model Editor, on the Global, State, or Action Properties tabs, and on the Edit Parameters Properties dialog box. The Group values parameter option can only be configured on the Edit Parameters Properties dialog box, which you can display by right-clicking a parameter on one of the properties tabs, and choosing Edit parameter details. See the State, Action, and Global for more information about model parameters.
Name Parameter Setting
| Name Parameter | Description |
|---|---|
| Name | You can use all Unicode characters except double quotes (") in this field for your parameter name. Note that the parameter is created with a default name that you can change when you add it. |
Type Parameter Settings
| Type Parameter Setting | Description |
|---|---|
| Integer | Defines a parameter as a whole number (not a fraction) that can be positive, negative, or zero. Use the Integer parameter type in models when, for instance, a count of something is important, such as the number of users or test cases. |
| True or False | Defines a parameter as a Boolean type such as on or off, true or false, and other similar values. |
| Real | Defines the parameter as real data type including rational numbers, such as 5, -5, and 2/3. It also includes irrational numbers, such as the square root of 2. Use a real data type for values such as for degrees, radians, or other similar information. |
| Text | Defines the parameter as a string data type or to define an allowable list of characters as a string. It can be any integer constraint, for example, 2, 4, 8, 16 would make a string of either 2, 4, 8, or 16 characters long and much like other constraints, you can combine multiple constraints here. If you want to set a range of allowable characters, you must make them a range, e.g., 'a':'z' or a list "aeiou". Remember that the single and double quotes are important. |
| Set | Defines a set of allowed values for this parameter. Use this selection if you want Eggplant DAI to select a value from a specific list of values at runtime. For example: 'spring', 'summer', 'autumn', 'winter’. To input your list of values, right-click the parameter, select Edit Parameter Details from the context menu, then use the Values section of the Parameter Properties dialog box to set the values. You can use all Unicode characters but double quotes (") in this field. |
| Record | Directs DAI to read parameter values from records contained in a CSV file. To identify the directory containing the CSV file, go to Controller > Environments and find the execution environment that you're using. Click the Actions menu button (...) and select Edit to see the directory path. When DAI accesses the parameter, it selects one of the records from the CSV file and stores it in the parameter. Note: When using data from a CSV file to pass values to a parameter, if a row of the CSV file contains four comma separated values (such as, "spring, summer, autumn, winter"), then the whole row will be passed to the parameter. If you only require a specific value from the list, for example, "autumn", then you must parse the row using a SenseTalk snippet. See Chunk Expressions for information about writing a snippet to access elements in text. |
| Initial value | The initial value, if any, that you want to set for this parameter. The initial value must be valid for the type selected. If the selected type is Record, the option you select in the Initial value field determines the file from which the value will be selected. |
Generation Parameter Settings
The Generation parameter setting is where you specify if you want DAI to generate a parameter value for you at test run-time, and if you want to be able to override it, or if you always want DAI to use the value you set. You can think of Generated values as dynamic changeable values that can be generated at runtime, or overridden later in a script, test case, or test configuration (test config). You can think of Non-generated values as static values, that you can only set and change on the Global, State, or Action Properties tabs in the Model Editor, or in a linked SenseTalk script or handler (called a snippet in DAI). Enter the appropriate parameter generation method from the list menu.
Specifying one of the "generated" options enables the model parameter to appear in the list of parameters in a test case or test config where you can override its value with a custom value. Test cases and test configs do inherit the parameters configured with the "non-generated" option. However, they are not listed in the test case or test config because you cannot override them there.
| Generation Parameter Setting Option | Description |
|---|---|
| Generated | Generates a new value for a parameter based on its parameter type. |
| Generated Unique | Generates a value but can't reuse a value that has been previously used. |
| Generated one-time | The generated value is selected once and then not selected again. The value remains static throughout the run. |
| Non-generated | The value is not generated by DAI. You must set it either in the Model Editor or by passing the parameter to a snippet, which then returns the required value to DAI. A snippet can also change an existing value in the same way. Values for non-generated parameters cannot be overridden in a test case or test configuration (test config). Therefore, they are not available on the configuration panels for test cases or test configs. |
For Generated or Generated unique methods, the value is selected by the engine based on the rules in the parameter definition at the start of every Action/State execution in which it is defined before the snippet execution. If it is Generated one-time method, then it is only generated once, and that value remains for the rest of the model execution unless it is changed by a snippet.
Value Groups Parameter Settings
Value groups enable you to further define the parameters Eggplant DAI generates. You define value groups defined by range lower:upper or list 2,4,6,8. Enter a value group as a value definition, using one definition per line.
You can only set the Value groups parameter options on the Parameter properties dialog box, which you can display by right-clicking a parameter on the Global, State, or Action Properties tabs.
| Parameter | Settings |
|---|---|
| Values | The allowable values for this group entry. You can define parameter values as follows: Enter a static value, such as 100Enter a range, such as 0:100Enter a list, such as 0,2,4,6,8 |
| Weight | The relative weight you want Eggplant DAI to use when generating this parameter. For example, if you want Eggplant DAI to use this value group 50 percent of the time (as compared to the other value groups) when generating this parameter, enter 50 in this field. |
| Distribution | The statistical distribution method you want Eggplant DAI to use when generating this parameter: Flat: Use a flat statistical distribution model. Normal: Use a normal statistical distribution model. Edge: Use statistical outliers. |
| Cov grps (Coverage groups) | Determines the number of segments Eggplant DAI uses to divide the values entries. Eggplant DAI begins with a value of 10 equal segments by default, then processes the values you enter for a value group and suggests a coverage group. For example, if you enter 0:360 as a value, Eggplant DAI might suggest 10 coverage groups that include 36 possible values for each coverage group to cover the value range from 0 to 360. You can manually enter a coverage group value that meets the needs of your model. |