Used to map the value in one variable over to the value of another variable.
sThis is useful when the same functional point is being used more than once or
when the same variable name is used between different functional points that are
in the same test-case.
The following is an example of creating a list and using it in a tag.
<testcase xmlns="jelly:jameleon">
<map-variable toVariable="resultsText" variableType="list">
<variable-value>value 1</variable-value>
<variable-value>value 2</variable-value>
<variable-value>value 3</variable-value>
<variable-value>value 4</variable-value>
</map-variable/>
<some-session application="someApp" beginSession="true">
<some-tag-that-uses-context-variables
functionId="Verify successful navigation, using a different variable."
someVariable="${resultsText}/>
</some-session>
</testcase>
The following is an example of mapping one value of a variable to another variable (pretty much useless).
<testcase xmlns="jelly:jameleon">
<some-session application="someApp" beginSession="true">
<some-tag-that-uses-context-variables
functionId="Verify successful navigation, using a different variable.">
<map-variable
fromVariable="resultsText1"
toVariable="resultsText"/>
</some-tag-that-uses-context-variables>
</some-session>
</testcase>
The following is an example of using the ${varName} notation (recommended)
<testcase xmlns="jelly:jameleon">
<some-session application="someApp" beginSession="true">
<some-tag-that-uses-context-variables
functionId="Verify successful navigation, using a different variable."
resultsText="${resultsText1"/>
</some-session>
</testcase>
The following is an example of mapping multiple variable values to a single variable.
Notice it's variableType is set to "list":
<testcase xmlns="jelly:jameleon">
<some-session application="someApp" beginSession="true">
<some-tag-that-uses-context-variables
functionId="Verify successful navigation, using a different variable.">
<map-variable
fromVariable="resultsText1"
toVariable="resultsText"
variableType="list"/>
<map-variable
fromVariable="resultsText2"
toVariable="resultsText"
variableType="list"/>
<map-variable
fromVariable="resultsText3"
toVariable="resultsText"
variableType="list"/>
</some-tag-that-uses-context-variables>
</some-session>
</testcase>
The value(s) can be entered directly like so:
<testcase xmlns="jelly:jameleon">
<some-session application="someApp" beginSession="true">
<some-tag-that-uses-context-variables
functionId="Verify successful navigation, using a different variable.">
<map-variable toVariable="resultsText" variableType="list">
<variable-value>value 1</variable-value>
<variable-value>value 2</variable-value>
<variable-value>value 3</variable-value>
<variable-value>value 4</variable-value>
</map-variable/>
</some-tag-that-uses-context-variables>
</some-session>
</testcase>
setFromVariable(String fromVariable)
Sets the variable name in the CSV file being mapped to the officially supported function tag variable name
method.
void
setToVariable(String toVariable)
Sets the variable name to map the fromVariable to.
An implementation of the doTag method provided by the TagSupport class.
Maps the value in the fromVariable over to the original variable name, toVariable.
Sets the variable name in the CSV file being mapped to the officially supported function tag variable name
method. This variable does not a set method for in the function point.