Eviware Forum

soapUI => soapUI => Topic started by: ind on July 25, 2007, 08:16:44 am



Title: log message
Post by: ind on July 25, 2007, 08:16:44 am
hi all,

i have just created a groovy script and i want to see the value for that.
how to read the value resulting from log information.

i have used,
def items = holder.getNodeValues( "//clientSession::*")
for (item in items)
{
log.info( item )
}

where to view the log info that holds the item value. i need to get the values of clientSession node and also suggest me that the above code snippet is correct?

thanks
ind


thanks


Title: Re: log message
Post by: omatzura on July 25, 2007, 09:09:36 am
Hi!

looks correct to me, but maybe you need to adjust the xpath to be

"//clientSession/text()" ?

the log.info( .. ) writes to the groovy log tab at the bottom of the soapUI window.. you could also add a

log.info( "Found " + items.length + " items.." )

before the for-loop, so your whole script would be

Code:
def items = holder.getNodeValues( "//clientSession/text()")
log.info( "Found " + items.length + " items.." )
for (item in items)
{
log.info( item )
}

Hope this helps!

/Ole
eviware.com