Forum Discussion

alexis733's avatar
alexis733
Occasional Contributor
8 years ago

Re: Comparing JDBC results

Hello there,   I'm having the same problem. In my case I need to create a JDBC Request to "count" the elements on a certain table of a DB, then I performed some deletions from the DB and later asse...
  • PaulMS's avatar
    PaulMS
    8 years ago

    You can transfer the result of a JDBC request using a property transfer test step or a script assertion (below)

     

    import com.eviware.soapui.support.XmlHolder
    holder = new XmlHolder( context.responseAsXml )
    context.testCase.setPropertyValue( "Quantity", holder.getNodeValue("//QUANTITY") )

     Note //QUANTITY is in uppercase assuming the default setting to convert names of fields in request results to uppercase