[Webtest] Javascript support ready!
Dierk Koenig localhost
webtest@lists.canoo.com
Fri, 14 Mar 2003 15:24:52 +0100
this does currently fail...
<target name=3D"testCacheBug">
<!--
The following sequence reproduces a bug where the internal =
parameter cache is
not reset correctly after a submit and an error is caused in =
a subsequent
submit because the particular parameter does not exist =
(anymore).
The first form contains an input field "field2". This is set =
with a value
and the form (request) is submitted.
As response is a page with a different form displayed. This =
form does not contain
an input field "field2" but an input field "field1". This is =
populated and
the form is submitted.
Without having the bug fix active an httpunit error will =
occur after the 2nd submit
complaining that the parameter "field2" does not exist.
Reason: There is an internal parameter cache that stores the =
parameters of all
<setinputfield ...> steps until a request containing these =
parameters is submitted.
After creating the request and submitting it, the cache =
needs to be invalidated since
the next response can contain completely different =
parameters. This invalidation
was missing.
Fix: context.resetNextParameters() added in
AbstractTestStepSpecification.gotoTarget(TestContext, =
String, WebRequest)
-->
<testSpec name=3D"Reset parameter cache bug">
&sharedConfiguration;
<steps>
<invoke stepid=3D"Open multiple form page"
url=3D"${start.page}?mode=3DpostTest&forms=3Dmultiple"/>
<setinputfield stepid=3D"Parameter in first form"
name=3D"field2"
value=3D"X"/>
<clickbutton stepid=3D"Click the submit button"
label=3D"doItAgain3"/>
<setinputfield stepid=3D"Parameter in second form"
name=3D"field1"
value=3D"XX"/>
<clickbutton stepid=3D"Click the submit button"
label=3D"doIt"/>
</steps>
</testSpec>
</target>
> -----Original Message-----
> From: webtest-admin@lists.canoo.com
> [mailto:webtest-admin@lists.canoo.com]On Behalf Of Goeschl Siegfried
> Sent: Freitag, 14. M=C3=A4rz 2003 13:11
> To: webtest@lists.canoo.com
> Subject: AW: [Webtest] Javascript support ready!
>=20
>=20
> Hi Dierk,
> =20
> is this "testCacheBug" an evil thing which could break my tests?!=20
> =20
> Siegfried Goeschl
>=20
> -----Ursprngliche Nachricht-----=20
> Von: Dierk Koenig [mailto:dierk.koenig@canoo.com]=20
> Gesendet: Do 13.03.2003 20:01=20
> An: webtest@lists.canoo.com=20
> Cc: Andreas Henle; Marcel Ruedi; Hans Wegener; Gerd=20
> Hillebrand; Alexio Moreno=20
> Betreff: [Webtest] Javascript support ready!
> =09
> =09
>=20
> Hiall,
> =09
> I'm happy to announce the first Version of CanooWebTest that also
> supports JavaScript. This concerns build number 275 and higher.
> =09
> I'm sure the community will find a lot of deficiencies in the JS
> implementation but I hope you will appreciate it anyway.
> =09
> I unexpectedly re-introduced the "testCacheBug", although I tried
> to avoid it. Carsten: could you please help me with that?
> =09
> I would recommend to try this build on a separate installation as
> some changes may break a lot of your tests. The parser is now
> somewhat sloppy (like most browsers).
> =09
> happy testing
> Mittie
> =09
> P.S. new httpunit version in use is 1.5.3-d-12M
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> =09
>=20
> Yzjm~y