[Webtest] Iterating pages?

Dierk Koenig webtest@lists.canoo.com
Mon, 30 Dec 2002 15:19:32 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_000F_01C2B016.DA98A0C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Yes, as HttpUnit is just a package for sending requests and retrieving
responses from a web application
you can use its Java API just like WebTest does internally.

You can loop over the "Data Entry" pages until you find e.g. a certain
element in the page.

In contrast to CanooWebTest you have to code it in Java and you have to care
for the
reporting features on your own. But you are much more flexible in what you
do.

cheers
Mittie



 -----Original Message-----
From: webtest-admin@lists.canoo.com [mailto:webtest-admin@lists.canoo.com]On
Behalf Of Mike Lecza
Sent: Montag, 30. Dezember 2002 14:59
To: webtest@gate.canoo.com
Subject: RE: [Webtest] Iterating pages?


  Thanx for the reply.  Are you saying that there is something in HttpUnit
that would help?





  Regards,

  Mike



  -----Original Message-----
  From: webtest-admin@gate.canoo.com [mailto:webtest-admin@gate.canoo.com]
On Behalf Of Dierk Koenig
  Sent: Monday, December 30, 2002 8:51 AM
  To: webtest@gate.canoo.com
  Subject: RE: [Webtest] Iterating pages?



  Hi Mike,



  Currently, there is no easy way. (but would make for good contribution:-)



  One possibility is to set up your webapp in a way that you can foresee the
number of steps.

  We sometimes use a special "administration servlet" to this end.



  If that is not possible, you be left with using HttpUnit directly (not too
bad either).



  cheers and a Happy New Year

  Mittie

    -----Original Message-----
    From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com]On Behalf Of Mike Lecza
    Sent: Montag, 30. Dezember 2002 14:34
    To: webtest@gate.canoo.com
    Subject: [Webtest] Iterating pages?

    With Canoo - Is there a way to iterate a bunch of steps until a final
page is hit.



    For example I have a web app that serves up a bunch of questions (1 per
page).  When the user has answered so many question correctly the
application serves up a “Finished” page.  So basically I want Canoo to keep
submitting answers until the Finished page is reached.



    I see the repeat option but that is only good if I want to repeat for a
specific number of times – I want to repeat until a certain page is hit.



    Regards


------=_NextPart_000_000F_01C2B016.DA98A0C0
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=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2722.900" name=3DGENERATOR>
<STYLE>@font-face {
	font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
	COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
	COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
	COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
	COLOR: purple; TEXT-DECORATION: underline
}
SPAN.emailstyle17 {
	COLOR: windowtext; FONT-FAMILY: Arial
}
SPAN.EmailStyle18 {
	COLOR: navy; FONT-FAMILY: Arial
}
DIV.Section1 {
	page: Section1
}
</STYLE>
</HEAD>
<BODY lang=3DEN-US vLink=3Dpurple link=3Dblue>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D932480914-30122002>Yes,=20
as HttpUnit is just a package for sending requests and retrieving =
responses from=20
a web application</SPAN></FONT></DIV>
<DIV><FONT><SPAN class=3D932480914-30122002></SPAN></FONT><FONT =
face=3DTahoma><FONT=20
size=3D2><SPAN class=3D932480914-30122002><FONT face=3DArial =
color=3D#0000ff>you can use=20
its&nbsp;Java API just like WebTest does=20
internally.</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DTahoma><FONT face=3DArial color=3D#0000ff =
size=3D2><SPAN=20
class=3D932480914-30122002></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DTahoma><FONT face=3DArial color=3D#0000ff =
size=3D2><SPAN=20
class=3D932480914-30122002>You can loop over the "Data Entry" pages =
until you find=20
e.g. a certain element in the page.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DTahoma><FONT face=3DArial color=3D#0000ff =
size=3D2><SPAN=20
class=3D932480914-30122002></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DTahoma><FONT face=3DArial color=3D#0000ff =
size=3D2><SPAN=20
class=3D932480914-30122002>In contrast to CanooWebTest you have to=20
</SPAN></FONT></FONT><FONT face=3DTahoma><FONT face=3DArial =
color=3D#0000ff=20
size=3D2><SPAN class=3D932480914-30122002>code it in =
Java</SPAN></FONT></FONT><FONT=20
face=3DArial><FONT color=3D#0000ff><FONT size=3D2>&nbsp;<SPAN=20
class=3D932480914-30122002>and you have to care for=20
the</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D932480914-30122002>reporting features on your own. But you are =
much more=20
flexible in what you do.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D932480914-30122002></SPAN></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D932480914-30122002>cheers</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D932480914-30122002>Mittie</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DTahoma><FONT size=3D2><SPAN=20
class=3D932480914-30122002></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DTahoma><FONT size=3D2><SPAN=20
class=3D932480914-30122002>&nbsp;</SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DTahoma><FONT size=3D2><SPAN=20
class=3D932480914-30122002></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DTahoma><FONT size=3D2><SPAN=20
class=3D932480914-30122002>&nbsp;</SPAN>-----Original =
Message-----<BR><B>From:</B>=20
webtest-admin@lists.canoo.com =
[mailto:webtest-admin@lists.canoo.com]<B>On Behalf=20
Of </B>Mike Lecza<BR><B>Sent:</B> Montag, 30. Dezember 2002 =
14:59<BR><B>To:</B>=20
webtest@gate.canoo.com<BR><B>Subject:</B> RE: [Webtest] Iterating=20
pages?<BR><BR></DIV></FONT></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
  <DIV class=3DSection1>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thanx for =
the=20
  reply.&nbsp; Are you saying that there is something in HttpUnit that =
would=20
  help?</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial">Regards,</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial">Mike</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DTahoma =
size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original=20
  Message-----<BR><B><SPAN style=3D"FONT-WEIGHT: bold">From:</SPAN></B>=20
  webtest-admin@gate.canoo.com [mailto:webtest-admin@gate.canoo.com] =
<B><SPAN=20
  style=3D"FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Dierk =
Koenig<BR><B><SPAN=20
  style=3D"FONT-WEIGHT: bold">Sent:</SPAN></B> Monday, December 30, 2002 =
8:51=20
  AM<BR><B><SPAN style=3D"FONT-WEIGHT: bold">To:</SPAN></B>=20
  webtest@gate.canoo.com<BR><B><SPAN=20
  style=3D"FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [Webtest] =
Iterating=20
  pages?</SPAN></FONT></P>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times =
New Roman"=20
  size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
color=3Dblue=20
  size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Arial">Hi=20
  Mike,</SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times =
New Roman"=20
  size=3D3><SPAN style=3D"FONT-SIZE: =
12pt"></SPAN></FONT>&nbsp;</P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
color=3Dblue=20
  size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Currently, =
there is=20
  no easy way. (but would make for good =
contribution:-)</SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times =
New Roman"=20
  size=3D3><SPAN style=3D"FONT-SIZE: =
12pt"></SPAN></FONT>&nbsp;</P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
color=3Dblue=20
  size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Arial">One=20
  possibility is to set up your webapp in a way that you can foresee the =
number=20
  of steps.</SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
color=3Dblue=20
  size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Arial">We=20
  sometimes use a special "administration servlet" to this=20
  end.</SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times =
New Roman"=20
  size=3D3><SPAN style=3D"FONT-SIZE: =
12pt"></SPAN></FONT>&nbsp;</P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
color=3Dblue=20
  size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Arial">If that=20
  is not possible, you be left with using HttpUnit directly (not too bad =

  either).</SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times =
New Roman"=20
  size=3D3><SPAN style=3D"FONT-SIZE: =
12pt"></SPAN></FONT>&nbsp;</P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
color=3Dblue=20
  size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Arial">cheers=20
  and a Happy New Year</SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
color=3Dblue=20
  size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Arial">Mittie</SPAN></FONT></P></DIV>
  <BLOCKQUOTE=20
  style=3D"BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: =
medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; MARGIN: 5pt 0in 5pt =
3.75pt; BORDER-LEFT: blue 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: =
medium none">
    <P class=3DMsoNormal=20
    style=3D"MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 0.5in; MARGIN-RIGHT: =
0in"><FONT=20
    face=3DTahoma size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original=20
    Message-----<BR><B><SPAN style=3D"FONT-WEIGHT: =
bold">From:</SPAN></B>=20
    webtest-admin@lists.canoo.com =
[mailto:webtest-admin@lists.canoo.com]<B><SPAN=20
    style=3D"FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Mike =
Lecza<BR><B><SPAN=20
    style=3D"FONT-WEIGHT: bold">Sent:</SPAN></B> Montag, 30. Dezember =
2002=20
    14:34<BR><B><SPAN style=3D"FONT-WEIGHT: bold">To:</SPAN></B>=20
    webtest@gate.canoo.com<BR><B><SPAN=20
    style=3D"FONT-WEIGHT: bold">Subject:</SPAN></B> [Webtest] Iterating=20
    pages?</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">With Canoo - Is there =
a way to=20
    iterate a bunch of steps until a final page is =
hit.</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">For example I have a =
web app=20
    that serves up a bunch of questions (1 per page).&nbsp; When the =
user has=20
    answered so many question correctly the application serves up a =
=93Finished=94=20
    page.&nbsp; So basically I want Canoo to keep submitting answers =
until the=20
    Finished page is reached.</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
color=3D#0000ff=20
    size=3D2><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">I see the repeat =
option but that=20
    is only good if I want to repeat for a specific number of times =96 =
I want to=20
    repeat until a certain page is hit.</SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT =
face=3D"Times New Roman"=20
    size=3D3><SPAN style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
    <P class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in"><FONT face=3DArial =
size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">Regards</SPAN></FONT></P></BLOCKQUOTE></DIV></BLOCKQUOTE></BODY></=
HTML>

------=_NextPart_000_000F_01C2B016.DA98A0C0--