fazleskhan
14 years agoNew Contributor
reading value from jdbc query in a Script Assertion
I am trying to use the jdbc test step to read a value from the database and assign it to as a property in the context. The sql runs and I see valid data in the XML panel
But when I execute the Script Assertion no value is found for the xpath location
Is "Reponse" the correct string I should supply to get the Response for the current Test Step?
<Results>
<ResultSet fetchSize="0">
<Row rowNumber="1">
<VERIFYCONTACT.NONCE>Fv5IjrEVWtqR5me20cOUgx+W072QOWCq</VERIFYCONTACT.NONCE>
</Row>
</ResultSet>
</Results>
But when I execute the Script Assertion no value is found for the xpath location
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( "Response" )
def nonce = holder["//VERIFYCONTACT.NONCE"]
log.info(nonce.length)
assert nonce
Is "Reponse" the correct string I should supply to get the Response for the current Test Step?