7 messages in com.canoo.lists.webtestRe: [Webtest] Bug in ScriptStep?
FromSent OnAttachments
Denis N. Antonioli22 Mar 2006 04:16 
Marc Guillemot22 Mar 2006 04:33 
Dierk Koenig22 Mar 2006 04:48 
Denis N. Antonioli22 Mar 2006 05:33 
Denis N. Antonioli23 Mar 2006 01:23.xml
Marc Guillemot23 Mar 2006 02:16 
Dierk Koenig23 Mar 2006 02:34 
Subject:Re: [Webtest] Bug in ScriptStep?
From:Marc Guillemot (mgui@yahoo.fr)
Date:03/23/2006 02:16:50 AM
List:com.canoo.lists.webtest

Hi Denis,

I think that your

def isDateInRange(event) { // this statement breaks if eventTo is not a Date! eventTo.after(event) }

is faulty: it uses the variable eventTo that is not defined here. When your script contains:

eventTo = makeDate(step.project.properties.eventTo)

then the eventTo variable is put in the binding and can be retrieved in the isDateInRange method. When you use the def keyword

def eventTo = makeDate(step.project.properties.eventTo)

the variable is local (to the run() method of the script) and can't be seen in makeDate.

I think therefore that the scriptStep / groovy steps behave correctly. Why doesn't your makeDate simply take 2 parameters?

Marc. -- View this message in context:
http://www.nabble.com/Bug-in-ScriptStep--t1323554.html#a3549243 Sent from the WebTest forum at Nabble.com.