Forum Discussion

SUSHMI's avatar
14 years ago

need help with GroovyScript with JDBC Request Response

Hi ,
I am trying to write Groovy Script for below response that came from JDBC Request Test step.

Test StepName : getLineInfo

<Results>
<ResultSet fetchSize="0">
<Row rowNumber="1">
<TBLMEDIAPLANS.VERSION>1</TBLMEDIAPLANS.VERSION>
<TBLMEDIAPLANS.LEGALSTATUSID>2</TBLMEDIAPLANS.LEGALSTATUSID>
<TBLMEDIAPLANS.STATUSID>2</TBLMEDIAPLANS.STATUSID>
</Row>
<Row rowNumber="2">
<TBLMEDIAPLANS.VERSION>2</TBLMEDIAPLANS.VERSION>
<TBLMEDIAPLANS.LEGALSTATUSID>1</TBLMEDIAPLANS.LEGALSTATUSID>
<TBLMEDIAPLANS.STATUSID>1</TBLMEDIAPLANS.STATUSID>
</Row>
</ResultSet>
</Results>

I need Values of "TBLMEDIAPLANS.VERSION".
So I wrote below line.
def count = context.expand( '${getLineInfo#Response#//Results[1]/ResultSet[1]/Row[1]/TBLMEDIAPLANS.VERSION[1]/text()}' )
log.info(count)

It is not logging out anything ..

Can you please help me ?
No RepliesBe the first to reply