Hello,

I am trying to do the following:
Have a session where a user is assigned an ID, then have another
subsequent session where the user accesses that ID.

>From what I can tell, I have to do this in separate Ant projects  (I
tried restructuring my entire architecture to have a single top level
project, but then encountered countless other obstacles that would have
necessitated me re-writing the entire suite from scratch -- IIRC because
of what can and can't be nested...).

So, what I'm trying to do is use antWrapper calls as follows:

Session1:
<storeRegEx
      description="Remember registry number"
      text="gl[0-9]+[a-z]?"
      group="0"
      property="regNumber" 
          />
<storeProperty
            description="convert prop type "
            name="registryNumber"
            value="#{regNumber}" 
                propertyType="ant"/>
<antWrapper>
<exec executable="touch"> <arg
value="tmp/${registry.accessLevel}.lastName.${registrantLastName.value}"
/></exec>
<exec  executable="touch"> <arg
value="tmp/${registry.accessLevel}.regNumber.${registryNumber}"
/></exec>
</antWrapper>

Session2 (separate project):
<antWrapper>
<exec executable="ls" outputproperty="lastName"><arg
value="tmp/protected.lastName.*"/> </exec>
<exec executable="ls" outputproperty="regNumber"><arg
value="tmp/protected.regNumber.*"/> </exec>
<echo message="last name is ${lastName}"/>
</antWrapper>


Note:  in the Session1 example, I've tried -- within the antWrapper --
to access the registryNumber both with #{} and ${}.
Also, it might seem a funny way to try to store values (using a
filename, with touch and ls....);  I tried to set environment variables,
but to no avail.

I can see in my results that the #{regNumber}  does resolve to a  value
and gets assigned to registryNumber, however, looking in my tmp
diorectory I have only seen files named
protected.regNumber.${registryNumber}
Or
protected.regNumber.#{registryNumber}
        
Also, in the echo statement form session2, it echoes 'last name is
${lastName}', without resolving the variable. (looking in the directory,
the variable has been resolved in the "touch" operation, and should be
something like "protected.lastName.Smith")

I suspect that most of this is caused by and variables being reasolved
at compile time, and dynamic variables being resolved at runtime (or in
realtime - forget the phraseology used...), but then I don't understand
how any variable could be converted from Dynamic to Ant as explained in
the docs.

In any event, if anyone has a better way of doing what I'm trying to do,
it would be appreciated.

Thanks,
Mike
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to