[Webtest] Ant Tasks don't work properly
Marc Guillemot
webtest@lists.canoo.com
Fri, 28 Jul 2006 11:09:21 +0200
Hi Veit,
this will be correct... in some time.
Currently the properties in tasks within <webtest> and </webtest> are
expanded too early (before the first task is executed) causing echo not
to know the value of the property ${newUser}.
I'm working (since too many time) on a deep rework of WebTest internals
to correctly handles such cases (among others) but it is still not ready.
The workaround is to compute your timestamp properties before the <webtest>.
Marc.
Veit Guna wrote:
> Hi.
>
> I would like to use simple ant tasks in a webtest task. But all I get is:
>
> [null] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: null
> (33/37)
> [null] INFO (com.canoo.webtest.steps.Step) -
> WrappedSteps.attributes not found.
> [null] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: null
> (34/37)
> [null] INFO (com.canoo.webtest.steps.Step) -
> WrappedSteps.attributes not found.
> [echo] ${timestamp}
> [null] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: null
> (35/37)
> [null] INFO (com.canoo.webtest.steps.Step) -
> WrappedSteps.attributes not found.
> [null] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: null
> (36/37)
> [null] INFO (com.canoo.webtest.steps.Step) -
> WrappedSteps.attributes not found.
> [echo] ${newuser}
> [setInputField] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
> setInputField (37/37)
>
> I'm using the tasks as follows:
>
> <target name="test">
> <webtest name="Test the registration">
> &config;
> <steps>
> <tstamp>
> <format property="timestamp" pattern="ddMMyyhhmmss" />
> </tstamp>
> <echo message="${timestamp}" />
> <property name="newuser" value="user${tstamp}" />
> <echo message="${newuser}" />
>
> <setInputField value="${newuser}" forLabel="Benutzername" />
> </steps>
> </webtest>
> </target>
> </project>
>
>
> Any hints what I'm doing wrong? The examples on the manual pages look
> similar...
>
> regards,
> Veit
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>