Ayhan Tek - 2008-10-31

Hello,

I'd like to pass a variable from <test-suite> to testBlock() method. I figured out how to pass a variable from <testcase> to testBlock() but cannot do it from <test-suite> to testBlock().

I am able to do it when I define the variable in the <testcase>, for ex:
<testcase xmlns="jelly:jameleon">
  <ju-session application="ABC">
     <map-variable toVariable="user" variableType="string">
        <variable-value>powerUser</variable-value>
    </map-variable>
<loginTheApplication
functionId="Login The App"
....
/>
</testcase>

In my business function's (LoginTheApplicationTag) testBlock() I can get this variable as:
String user = getVariableAsString("user"); // user will be powerUser

The question is how to define a similar thing in <test-suite> instead of <testcase> and retrieve it from testBlock()?
My test-suite looks like:
<test-suite xmlns="jelly:jameleon">
  <!-- I want to define a variable here and get it from testBlock() -->
    <test-script script="scripts/loginTheApplication.xml"/>
</test-suite>

Thanks in advance for the help,