public interface ParametrizedTestScript extends ExtendedParamsObject
ExtendedParamsObject
one and redeclares its methods with new
descriptions in the context of Java test scripts.T-Plan Robot Enterprise, (C) 2009-2022 T-Plan Limited. All rights reserved.
Modifier and Type | Method and Description |
---|---|
String |
getLongDescription()
Get long description of the object - purpose, usage, parameter syntax
etc.
|
List<String> |
getParameters()
Get the list of parameter names accepted by the test script.
|
List |
getParameterValues(String parameterName)
Get the list of acceptable values of a particular parameter (if known).
|
String |
getShortDescription()
Get short description which describes in a few words purpose and role of
the test script.
|
List<Preference> |
getVisualParameters()
Get the list of supported parameters encapsulated in
Preference
instances. |
void |
setParameters(Map<String,String> paramsAndValues)
Set parameters and their values.
|
List<String> getParameters()
getParameters
in interface ExtendedParamsObject
List getParameterValues(String parameterName)
Preference.TYPE_BOOLEAN
type the method should return a list
containing "true" and "false".getParameterValues
in interface ExtendedParamsObject
parameterName
- the parameter name.void setParameters(Map<String,String> paramsAndValues)
Set parameters and their values. For versions 3.5.1 and lower the method
is here to maintain compatibility with the ExtendedParamsObject
interface. The implementing Java test script should leave the method
empty.
Starting with version 3.5.2 the method gets called when the Properties
window of the Java test script gets closed with OK. The window collects
the parameter values from the GUI components (see
getVisualParameters()
) and passes them in form of a map to this
method before sending them to the command builder. The Java test script
class may take advantage of this method to tweak the parameters, for
example to remove default values etc. The method may also throw an
IllegalArgumentException
to indicate that one or more parameter
values are not acceptable. This will make the Properties window display
the exception message in a pop up and prevent the window from
closing.
setParameters
in interface ExtendedParamsObject
paramsAndValues
- the map of parameters and their values.List<Preference> getVisualParameters()
Preference
instances. It allows to specify a larger set of parameter properties such
as parameter name, label (short description), description, expected value
type and optional value limits and relationships with other parameters.
This allows the GUI to build and display the parameters in form of GUI
components in command property dialogs and validate the values entered by
users..getVisualParameters
in interface ExtendedParamsObject
Preference
instances.String getShortDescription()
getShortDescription
in interface ExtendedParamsObject
String getLongDescription()
CustomHyperlinkListener
. This is optional and
the method may return null. The long description will be displayed at the
top of the dynamically created test script parameter editor.getLongDescription
in interface ExtendedParamsObject