[Webtest] How to verify title on the redirected page

Conor MacMahon Conor MacMahon" <Conor.MacMahon@qsa.qld.edu.au
Fri, 29 Aug 2008 08:58:38 +1000


This is a multi-part message in MIME format.

------_=_NextPart_001_01C90961.9BF4CF19
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi Suzy,
            Do you want to measure the time, in that you want to error
out if it exceeds a certain amount of seconds? Or just measure the time
in general, and then give this feedback? For the former, you could
easily use the 'timedGroup' functionality in webtest
(http://webtest.canoo.com/webtest/manual/timedGroup.html).
            For the latter, you could use two tools via ant,
https://antutility.dev.java.net/ and
http://ant-contrib.sourceforge.net/tasks/tasks/performance_monitor.html.
Both will log out how long a particular task took, which is then logged
out, and hence you can read. I've used ant-contrib, and must admit it
has quite a few other handy tools that one would use now and again (i.e.
if/else statements, try-catch, etc.).
            From your requirements (i.e. wanting to have the most
accurate time measurement), sounds like you need to use the retry/sleep
below of wsoula@pointserve.com below, and set the sleep seconds to 1
second or lower order, to increase accuracy. And if that run doesn't
give you feedback in the ant log, use
http://ant-contrib.sourceforge.net/tasks/tasks/performance_monitor.html
to ensure you do get that feedback.
HTH,
Conor

________________________________

From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com] On Behalf Of Suzy Ng
Sent: Thursday, 28 August 2008 10:41 PM
To: webtest@lists.canoo.com
Subject: RE: [Webtest] How to verify title on the redirected page


Hi,
i have thought of doing that, but i also need to measure the time taken
for the redirected page to load.
So if i use this method the measurement might not be accurate.
So i'm wondering if there are any other ways to do that.

Thanks!




________________________________

From: wsoula@pointserve.com
To: webtest@lists.canoo.com
Subject: RE: [Webtest] How to verify title on the redirected page
Date: Thu, 28 Aug 2008 06:57:38 -0500


Have you tried sleeping after you login to give the the redirected to
page time to load?  You can even retry for awhile instead of doing a
hard sleep for a long time.
 
<retry maxCount="60">
    <sleep seconds="3"/>
    <verifyTitle text="Title of Redirected To page"/>
</retry>

________________________________

From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com] On Behalf Of Suzy Ng
Sent: Thursday, August 28, 2008 5:19 AM
To: webtest@lists.canoo.com
Subject: [Webtest] How to verify title on the redirected page


Hi,
I'm a new to webtest. I have a test which i need to verify the title on
the redirected page i.e.
I have a login page which i click to login, it will go to e.g. page A
and then redirect to page B.
It takes ard 1min plus for the page to be redirected to page B. I want
to verify the title on page B.
But when i run my webtest, it verifies the title on page A.
I have set auto refresh true... not sure what else i should be doing.
The redirect code is as follow:

<SCRIPT LANGUAGE="JavaScript">
<!--
function redirectTo(){
	var nextURL = "www.test.com....etc";
	location = nextURL;
}

//put a delay so that WA.GIF image will be logged in apache logs or else
the page will redirect too fast.
setTimeout("redirectTo()",100);

//->
</SCRIPT>

Please help.

Thanks.


________________________________

Share your beautiful moments with Photo Gallery. Windows Live Photo
Gallery <http://get.live.com/photogallery/overview>  

________________________________

Share your beautiful moments with Photo Gallery. Windows Live Photo
Gallery <http://get.live.com/photogallery/overview> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This email (including any attached files) is for the intended 
recipient(s) only. If you received this email by mistake, please, 
as a courtesy, tell the sender, then delete this email.

The views and opinions are the originator's and do not necessarily 
reflect those of the Queensland Studies Authority. All reasonable 
precautions have been taken to ensure that this email contained no 
viruses at the time it was sent.
 

------_=_NextPart_001_01C90961.9BF4CF19
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<HTML xmlns:eXclaimer=3D"http://www.exclaimer.co.uk">
<HEAD>
<META http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3DUTF-16">

<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<STYLE>.hmmessage P {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: =
0px; PADDING-TOP: 0px
}
BODY.hmmessage {
	FONT-SIZE: 10pt; FONT-FAMILY: Tahoma
}
</STYLE>

<META content=3D"MSHTML 6.00.6000.16608" name=3DGENERATOR></HEAD><BODY =
class=3Dhmmessage><DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D300043022-28082008><FONT =
face=3DArial=20
color=3D#0000ff>Hi Suzy,</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D300043022-28082008><FONT=20
color=3D#0000ff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;=20
<FONT face=3DArial>Do you want to measure the time, in that you want to =
error out=20
if it exceeds a certain amount of seconds? Or just measure the time in =
general,=20
and then give this feedback?&nbsp;For the former, you could easily use =
the=20
'timedGroup' functionality in webtest (<A=20
href=3D"http://webtest.canoo.com/webtest/manual/timedGroup.html">http://w=
ebtest.canoo.com/webtest/manual/timedGroup.html</A>).</FONT></FONT></SPAN=
></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D300043022-28082008><FONT=20
color=3D#0000ff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;=20
<FONT face=3DArial>For the latter, you could use two tools via ant, <A=20
href=3D"https://antutility.dev.java.net/">https://antutility.dev.java.net=
/</A>&nbsp;and=20
<A=20
href=3D"http://ant-contrib.sourceforge.net/tasks/tasks/performance_monito=
r.html">http://ant-contrib.sourceforge.net/tasks/tasks/performance_monito=
r.html</A>.=20
Both will log out how long a particular task took, which is then logged =
out, and=20
hence you can read. I've used ant-contrib, and must admit it has quite a =
few=20
other handy tools that one would use now and again (i.e. if/else =
statements,=20
try-catch, etc.).</FONT></FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D300043022-28082008><FONT=20
color=3D#0000ff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;=20
<FONT face=3DArial>From your requirements (i.e. wanting to have the most =
accurate=20
time measurement), sounds like you need to use the retry/sleep below of =
<A=20
href=3D"mailto:wsoula@pointserve.com">wsoula@pointserve.com</A> below, =
and set the=20
sleep seconds to 1 second or lower order, to increase accuracy. And if =
that run=20
doesn't give you feedback in the ant log, use <A=20
href=3D"http://ant-contrib.sourceforge.net/tasks/tasks/performance_monito=
r.html">http://ant-contrib.sourceforge.net/tasks/tasks/performance_monito=
r.html</A>&nbsp;to=20
ensure you do get that feedback.</FONT></FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D300043022-28082008><FONT =
face=3DArial=20
color=3D#0000ff>HTH,</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D300043022-28082008><FONT =
face=3DArial=20
color=3D#0000ff>Conor</FONT></SPAN></DIV><BR>
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma><B>From:</B> webtest-admin@lists.canoo.com=20
[mailto:webtest-admin@lists.canoo.com] <B>On Behalf Of </B>Suzy=20
Ng<BR><B>Sent:</B> Thursday, 28 August 2008 10:41 PM<BR><B>To:</B>=20
webtest@lists.canoo.com<BR><B>Subject:</B> RE: [Webtest] How to verify =
title on=20
the redirected page<BR></FONT><BR></DIV>
<DIV></DIV>Hi,<BR>i have thought of doing that, but i also need to =
measure the=20
time taken for the redirected page to load.<BR>So if i use this method =
the=20
measurement might not be accurate.<BR>So i'm wondering if there are any =
other=20
ways to do that.<BR><BR>Thanks!<BR><BR><BR><BR>
<HR>
From: wsoula@pointserve.com<BR>To: webtest@lists.canoo.com<BR>Subject: =
RE:=20
[Webtest] How to verify title on the redirected page<BR>Date: Thu, 28 =
Aug 2008=20
06:57:38 -0500<BR><BR>
<META content=3D"Microsoft SafeHTML" name=3DGenerator>
<STYLE>.ExternalClass .EC_hmmessage P {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; =
PADDING-TOP: 0px
}
.ExternalClass BODY.EC_hmmessage {
	FONT-SIZE: 10pt; FONT-FAMILY: Tahoma
}
</STYLE>

<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff><SPAN=20
class=3DEC_753065211-28082008>Have you tried sleeping after you login to =
give the=20
the redirected to page time to load?&nbsp; You can even retry for awhile =
instead=20
of doing a hard sleep for a long time.</SPAN></FONT></DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff><SPAN=20
class=3DEC_753065211-28082008></SPAN></FONT>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff><SPAN=20
class=3DEC_753065211-28082008>&lt;retry =
maxCount=3D"60"&gt;</SPAN></FONT></DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff><SPAN=20
class=3DEC_753065211-28082008>&nbsp;&nbsp;&nbsp; &lt;sleep=20
seconds=3D"3"/&gt;</SPAN></FONT></DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff><SPAN=20
class=3DEC_753065211-28082008>&nbsp;&nbsp;&nbsp; &lt;verifyTitle =
text=3D"Title of=20
Redirected To page"/&gt;</SPAN></FONT></DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff><SPAN=20
class=3DEC_753065211-28082008>&lt;/retry&gt;</SPAN></FONT></DIV><BR>
<DIV class=3DEC_OutlookMessageHeader lang=3Den-us dir=3Dltr =
align=3Dleft>
<HR>
<FONT face=3DTahoma><B>From:</B> webtest-admin@lists.canoo.com=20
[mailto:webtest-admin@lists.canoo.com] <B>On Behalf Of </B>Suzy=20
Ng<BR><B>Sent:</B> Thursday, August 28, 2008 5:19 AM<BR><B>To:</B>=20
webtest@lists.canoo.com<BR><B>Subject:</B> [Webtest] How to verify title =
on the=20
redirected page<BR></FONT><BR></DIV>
<DIV></DIV>Hi,<BR>I'm a new to webtest. I have a test which i need to =
verify the=20
title on the redirected page i.e.<BR>I have a login page which i click =
to login,=20
it will go to e.g. page A and then redirect to page B.<BR>It takes ard =
1min plus=20
for the page to be redirected to page B. I want to verify the title on =
page=20
B.<BR>But when i run my webtest, it verifies the title on page A.<BR>I =
have set=20
auto refresh true... not sure what else i should be doing.<BR>The =
redirect code=20
is as follow:<BR><PRE id=3DEC_line18>&lt;<SPAN =
class=3DEC_start-tag>SCRIPT</SPAN><SPAN class=3DEC_attribute-name> =
LANGUAGE</SPAN>=3D<SPAN =
class=3DEC_attribute-value>"JavaScript"</SPAN>&gt;<BR>&lt;!--<BR>function=
 redirectTo(){<BR>	var nextURL =3D "www.test.com....etc";<BR>	location =
=3D nextURL;<BR>}<BR><BR>//put a delay so that WA.GIF image will be =
logged in apache logs or else the page will redirect too =
fast.<BR>setTimeout("redirectTo()",100);<BR><BR>//-&gt;<BR>&lt;/<SPAN =
class=3DEC_end-tag>SCRIPT</SPAN>&gt;</PRE><BR>Please=20
help.<BR><BR>Thanks.<BR><BR>
<HR>
Share your beautiful moments with Photo Gallery. <A=20
href=3D"http://get.live.com/photogallery/overview" =
target=3D_blank>Windows Live=20
Photo Gallery</A> <BR>
<HR>
Share your beautiful moments with Photo Gallery. <A=20
href=3D"http://get.live.com/photogallery/overview" target=3D_new>Windows =
Live Photo=20
Gallery</A> </DIV>
<PRE>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This email (including any attached files) is for the intended=20
recipient(s) only. If you received this email by mistake, please,=20
as a courtesy, tell the sender, then delete this email.

The views and opinions are the originator's and do not necessarily=20
reflect those of the Queensland Studies Authority. All reasonable=20
precautions have been taken to ensure that this email contained no=20
viruses at the time it was sent.
</PRE></BODY></HTML>

------_=_NextPart_001_01C90961.9BF4CF19--