3 messages in com.canoo.lists.webtestRE: [Webtest] Can do any judge in web...
FromSent OnAttachments
Chen Gefei12 Nov 2002 19:06 
Dierk Koenig13 Nov 2002 01:35 
EPu...@upstate.com13 Nov 2002 07:33 
Subject:RE: [Webtest] Can do any judge in webtest?
From:Dierk Koenig (dier@canoo.com)
Date:11/13/2002 01:35:22 AM
List:com.canoo.lists.webtest

Hi Chen,

If exist , delete it , if not creat a user.

I'm not sure about the logic here...

Let's tackle it one-by-one:

If exist , delete it

<steps> <!-- invoke page that displays the user --> <invoke .../> <!-- verify user is displayed, stop otherwise --> <verify.../> <!-- delete the user --> <clicklink .../> </steps>

if not create a user.

<steps> <!-- invoke page that displays the user --> <invoke .../> <!-- verify user is not displayed, stop otherwise --> <not> <verify.../> </not> <!-- create the user --> <clicklink .../> </steps>

Although all the above is possible, I guess you are looking for something different: a consistent state before starting the tests. I could not see, whether you expect no user or one user for test setup (your logic actually "toggles" that state). However, you can use the strategies above for test setup through the web interface or for a trailing cleanup. Make sure to have the <steps> contained in a separate <testSpec>. Whenever there is a database involved, it may be profitable to care for test setup by calling the db directly from preceding ant target. You may scan the mailing list archive for e.g. use of dbunit for that purpose.

cheers Mittie

-----Original Message----- From: webt@lists.canoo.com [mailto:webt@lists.canoo.com]On Behalf Of Chen Gefei Sent: Mittwoch, 13. November 2002 4:07 To: webt@lists.canoo.com Subject: [Webtest] Can do any judge in webtest?

hi all

I want to delete some user in an application , and first i want to know whether the user existed or not . If exist , delete it , if not creat a user.

Can i complete those acton through webtest ? or by ant ?

Thank you all