alexis733
8 years agoOccasional Contributor
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 assert if the deletions were performed in the DB. How to store the "count" of elements on the first JDBC Request so then I can compare it with the second "count" JDBC Request (this is the way, in my case, I use to compare if records removed form the first JDBC Request).
Any help please?
Thanks in advance
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