atom feed7 messages in com.canoo.lists.webtestRe: [Webtest] Newbie needs help with ...
FromSent OnAttachments
mili mirandaMay 22, 2006 11:07 am 
Marc GuillemotMay 23, 2006 8:26 am 
Dierk KoenigMay 23, 2006 8:38 am 
batAug 22, 2006 8:49 am 
Marc GuillemotAug 23, 2006 9:02 am 
batAug 24, 2006 1:43 am 
Marc GuillemotAug 24, 2006 4:09 am 
Subject:Re: [Webtest] Newbie needs help with cookie testing
From:Marc Guillemot (mgui@yahoo.fr)
Date:May 23, 2006 8:26:35 am
List:com.canoo.lists.webtest

Hi Mili,

welcome to WebTest.

Concerning your tests - each time you run a test you will have no cookie and therefore simulate a new user. - to simulate a visitor that visit again within 30 days, you will need to generate a cookie as first step of your test. There is no step doing this currently but a small script can do the work: <webtest> ... <steps> <groovy> def cookie = new org.apache.commons.httpclient.Cookie("your domain", "cookie name", "cookie value") step.context.webClient.webConnection.state.addCookie(cookie) </groovy> ... </steps> </webtest>

See:
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/Cookie.html for details about various cookie constructors

If you identify registered users with cookies to, then a similar setup can be done.

Marc. -- View this message in context:
http://www.nabble.com/Newbie+needs+help+with+cookie+testing-t1664308.html#a4525120 Sent from the WebTest forum at Nabble.com.