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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Suzy Ng
Sent: Thursday, 28 August 2008 10:41 PM
To: [email protected]
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: [EMAIL PROTECTED]
To: [email protected]
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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Suzy Ng
Sent: Thursday, August 28, 2008 5:19 AM
To: [email protected]
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.