Using ant variables
-------------------
Key: WT-522
URL: http://webtest-community.canoo.com/jira/browse/WT-522
Project: WebTest
Type: Bug
Environment: Windows XP Professional
Reporter: David Jehoul
I'm trying to generate a timestamp that is recalculated during the execution of
the same build, but it seems that the behavior is different when the <webtest>
command is added.
So, for example this:
<project name="test" default="test">
<property file="test.properties"/>
<import file="${webtest.home}/webtest.xml"/>
<import file="general.xml"/>
<target name="test" depends="wt.defineTasks">
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<var name="test" value="" unset="true"/>
<tstamp>
<format property="test"
pattern="d-MMMM-yyyy"/>
</tstamp>
<echo>${test}</echo>
<var name="test" value="" unset="true"/>
<tstamp>
<format property="test"
pattern="d-MMMM-yyyy" offset="5" unit="day"/>
</tstamp>
<echo>${test}</echo>
</target>
</project>
Produces the following expected output:
17-april-2009
22-april-2009
Adding the <webtest> command:
<project name="test" default="test">
<property file="test.properties"/>
<import file="${webtest.home}/webtest.xml"/>
<import file="general.xml"/>
<target name="test" depends="wt.defineTasks">
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<webtest name="blabla">
<var name="test" value="" unset="true"/>
<tstamp>
<format property="test"
pattern="d-MMMM-yyyy"/>
</tstamp>
<echo>${test}</echo>
<var name="test" value="" unset="true"/>
<tstamp>
<format property="test"
pattern="d-MMMM-yyyy" offset="5" unit="day"/>
</tstamp>
<echo>${test}</echo>
</webtest>
</target>
</project>
Produces the following output:
17-april-2009
17-april-2009
I know a workaround is to use ant properties with a different name, but for
making my scripts more generic, I would like to do it in the way above.
Thanks!
David
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest