Environment Editor
Aus ExpeccoWiki
The environment editor is used to create and edit variables in the environment of a test suite, a test plan or a compound block. The view slightly differs when either the testsuite's or a compound block's environment is edited. It can be found on the "Environment" tab after selecting the testsuite or a compound block in the navigation tree.
Buttons
Fields
- Variable-Name
This field is a text input field that holds the variable name, which must meet the rules for variable naming. Click it once to give it the input focus.
- NET
This checkbox determines whether the variable will be visible in expeccoNET or in exported parameter sets. This option/column is only shown in the project's variable environment.
- OW
This checkbox determines whether the variable hides (overwrites) an inherited variable from an outer scope, or not. This option/column is only shown for compound blocks.
- R/W
This field is a checkbox that determines whether the variable can be modified during initialization, or not.
- Datatype
This dropdown list provides a list of available data types. Choose the type of the variable here (typically, most likely a String-type is used)
- Initialization
This dropdown list provides a list of possible initialization methods for the variable's value. Most common are 'Constant' and 'New Instance', but it is also possible to assign a value during initialization by evaluating a programmatic expression, or to request values from the user via a dialog.
- Initial Value/Expression
Use this text field to enter the initial value (if the initialization method is 'Constant').
- Current Value
This field shows a variable's current value. This information is useful for writable variables (for example: counters or other measurements as gathered during execution) or for user-entered variables.
Initialization Types
Notice that variables are only initialized once, when the environment itself is instantiated. The instantiation happens at load time for the top-level project environment, or with every execution for the test-suite, testcase and action environments.
The concrete behavior, depending on the init-type, is:
- Constant
a constant value, such as a port-number, counter values, hostnames or other simple (unstructured) values. This value is used "as is".
- SecretConstant
like above, but its value is not shown in the variable-environment; useful for passwords. Notice: the algorithm for password storage is not secure. It will be easy for any experienced user/programmer to extract these values from either the saved test-suite or via the inspectors from the running test-suite. Also, the value might also be visible in the execution log.
- New Instance
creates a new (empty) instance of the datatype.
- New Instance of Size
given its size in the environment, create a vector (collection-like) instance.
- Ask for Size
will ask the user for the size of an instance to create.
- Request from User
opens a dialog to ask for the variable's value, when the project is loaded.
- Request from User when first used
opens a dialog to ask for the variable's value, when the variable's value is needed for the very first time during the session.
- Secret from User
like "Request from User", but hides the password in the dialog.
- Secret from User when first used
like "Request from User when first used", but hides the password in the dialog.
- Smalltalk Expression
the text is evaluated as a Smalltalk expression and the resulting value used to initialize the variable.
- JavaScript Expression
as above, but uses JavaScript syntax for the evaluation.
- GUI-Value
a special type used with GUI blocks (described elsewhere).
- GUI-Action
a special type used with GUI blocks (described elsewhere).
The "when first used" initialization-type is useful for passwords of dynamically alternative execution pathes - for example, if your testsuite needs either an ftp- or an http password, depending on which communication path is chosen dynamically.
Back to the Project Editor
For other editors see: Editors
The full online documentation can be found under: Online Documentation