[Webtest] dynamic number of inputfields
Carsten Seibert
webtest@lists.canoo.com
Tue, 21 May 2002 10:35:46 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0001_01C200B3.48308300
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hi Laval,
I suggest to prepare explicit test data where you exactly know what to
expect, e.g. one set of data to produce exactly 3 input fields and then test
these 3 fields. Having "logic" in the test raises the question of how to
test that logic? Therefore we generally avoid such things.
If you still need/want to do it, you could use the SQL tag to generate a
property file and then read this property file within your ant task test
task in order to determine the number of required iterations with <repeat>.
Ciao,
Carsten
Carsten Seibert
seiberTEC GmbH Switzerland
mailto:seibert@seibertec.ch / phone: +41 79 636 4317
-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com]On Behalf Of Laval Chung
Sent: Montag, 20. Mai 2002 13:02
To: webtest@gate.canoo.com
Subject: [Webtest] dynamic number of inputfields
In a page, the number of inputfields are dynamically created from the data
in the database.
So that i don't know in advance how many inputfields i'm going to verify.
Is there a way to do a select statement using the sql tag and store
the count value in a property tag so that i can use that property
in a repeat loop to verify the inputfields?
Or are there other solutions to this problem?
Cheers
laval
------=_NextPart_000_0001_01C200B3.48308300
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><SPAN class=3D508431808-21052002><FONT face=3DArial color=3D#0000ff =
size=3D2>Hi=20
Laval,</FONT></SPAN></DIV>
<DIV><SPAN class=3D508431808-21052002><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D508431808-21052002><FONT face=3DArial color=3D#0000ff =
size=3D2>I=20
suggest to prepare explicit test data where you exactly know what to =
expect,=20
e.g. one set of data to produce exactly 3 input fields and then =
test these=20
3 fields. Having "logic" in the test raises the question of how to test =
that=20
logic? Therefore we generally avoid such things.</FONT></SPAN></DIV>
<DIV><SPAN class=3D508431808-21052002><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D508431808-21052002><FONT face=3DArial color=3D#0000ff =
size=3D2>If you=20
still need/want to do it, you could use the SQL tag to generate a =
property file=20
and then read this property file within your ant task test task in order =
to=20
determine the number of required iterations with=20
<repeat>.</FONT></SPAN></DIV>
<DIV><SPAN class=3D508431808-21052002><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D508431808-21052002><FONT face=3DArial color=3D#0000ff =
size=3D2>Ciao,</FONT></SPAN></DIV>
<DIV><SPAN class=3D508431808-21052002><FONT face=3DArial color=3D#0000ff =
size=3D2>Carsten</FONT></SPAN></DIV>
<P><FONT size=3D2>Carsten Seibert<BR>seiberTEC GmbH Switzerland<BR><A=20
href=3D"mailto:seibert@seibertec.ch">mailto:seibert@seibertec.ch</A> =
; /=20
phone: +41 79 636 4317<BR></FONT></P>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B>=20
webtest-admin@lists.canoo.com =
[mailto:webtest-admin@lists.canoo.com]<B>On=20
Behalf Of </B>Laval Chung<BR><B>Sent:</B> Montag, 20. Mai 2002=20
13:02<BR><B>To:</B> webtest@gate.canoo.com<BR><B>Subject:</B> =
[Webtest]=20
dynamic number of inputfields<BR><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>In a page, the number of inputfields =
are=20
dynamically created from the data in the database.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>So that i don't know in advance how =
many=20
inputfields i'm going to verify.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Is there a way to do a select =
statement using the=20
sql tag and store</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the count value in a property tag so =
that i can=20
use that property</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>in a repeat loop to verify the=20
inputfields?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Or are there other solutions to this=20
problem?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Cheers</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>laval</FONT></DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0001_01C200B3.48308300--