[Webtest] How to implement a loop to check a status change?

Tize Ma webtest@lists.canoo.com
Thu, 22 Jul 2004 09:03:09 -0400


Thanks, Mittie.
Currently, I use the ant sleep, and give the longest possible time. I =
also tried the webtest sleep step. They are all OK for wait for a fixed =
amount of time.
What I need is to wait for the indexer status change and stop the =
waiting. I do need webtest functionality, including refreshing the page =
and verify some text. I have to do those stuffs to know the status =
changing from "progressing" to "complete". That is just the case of =
success. Of course, there is also the possibility of failure. Therefore, =
I think a loop with sleeping and conditional exiting the loop would be =
nice.
Thanks again.
Tize

-----Original Message-----
From: Dierk Koenig [mailto:dierk.koenig@canoo.com]
Sent: Thursday, July 22, 2004 7:44 AM
To: webtest@lists.canoo.com
Subject: RE: [Webtest] How to implement a loop to check a status change?


hi,
WebTest does not provide this feature 'out of the box'.
However, there may be some options for you:
0) Use the (still undocumented) sleep step to wait the maximum time.
1) Write your own webtest step. See the api doc of the extension package =
for
details.
2) If you just want to wait for the indexer and you don't need the =
webtest
specific
functionality, you can use plain ant steps (wait / waitfor / get).

cheers
Mittie

-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com]On Behalf Of Tize Ma
Sent: Mittwoch, 21. Juli 2004 20:09
To: webtest@lists.canoo.com
Subject: [Webtest] How to implement a loop to check a status change?



Hi, folks,
   I am testing a web app using Canoo webtest. For a particular page, I =
need
to do something like:

LOOP
  Sleep 30 seconds
  Verifytext for "Indexing completed"
  If previous step success, exit loop
END LOOP

   Is it possible to use Canoo script to achieve this? If so, could you =
tell
me how? (I tried to use repeat step, but could not make it to do what I
want).
Thanks a lot.
Tize
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest

_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest