Hi Fritz,

You don't need to explicitly unset properties when within a webtest.  The 
<storeProperty> task (see the storeProperty documentation: 
<http://webtest.canoo.com/webtest/manual/storeProperty.html>) bypasses Ant's 
immutable property paradigm unless you set the propertyType to be "antStrict".  
In the case below, if you were to use <storeProperty ... propertyType="ant" /> 
instead of <property ... /> in the Webtest section below, x2 = 12 would be 
printed without the use of unset. In the same example, if you used 
<storeProperty ... propertyType="antStrict"/>, x2 = 6 would be seen. Hopefully 
that helps.

Cheers,

John Spann

Software Engineer
Citrix Online | 6500 Hollister Avenue | Goleta, CA 93117
T: +1 805 690 3489 | M: +1 805 729 0008
[email protected]<x-msg://29/[email protected]>
http://www.citrixonline.com<http://www.citrixonline.com/>

[cid:[email protected]]


Access Your PC From Anywhere: www.gotomypc.com<http://www.gotomypc.com/>
Online Meetings Made Easy: www.gotomeeting.com<http://www.gotomeeting.com/>
Remote Support Made Easy: www.gotoassist.com<http://www.gotoassist.com/>
Webinars Made Easy: www.gotowebinar.com<http://www.gotowebinar.com/>




On Mar 9, 2010, at 6:54 AM, <[email protected]<mailto:[email protected]>> 
wrote:


Hi Marc,

 it seems as if the "unset" - function of the <var> task (Ant-Contrib) doesn't 
work within webtest.

<project default="test">
        <target name="test">

            <property name="x" value="6"/>
            <echo>6:${x}</echo>   <!-- will print 6 -->
            <var name="x" unset="true"/>
            <property name="x" value="12"/>
            <echo>12:${x}</echo>   <!-- will print 12 -->
<!-- this works OK x=12 -->

            <webtest name="Test">
                ...

                    <property name="x2" value="6"/>
                    <echo>x2=${x2}</echo>   <!-- will print 6 -->
                    <var name="x2" unset="true"/>
                    <property name="x2" value="12"/>
                    <echo>x2=${x2}</echo>   <!-- will print 12 -->
<!-- this doesn't work: x2 = 6 -->

                </webtest>
        </target>
</project>

This was an issue last year.
http://lists.canoo.com/pipermail/webtest/2009q2/012197.html

Is this issue in the queue?

Greetings,
Fritz Förster

<<inline: image001.png>>

Reply via email to