Forum Discussion
DMc-Cabe
11 years agoOccasional Contributor
nmrao wrote: 1. What kind of assertions you are doin on step1 response? xpath/contains etc?
2. Even if collection/array is available in step2, I beleive one could not use them in jdbc step.
I'm using groovy to inspect the specific nodes in the xml
import com.eviware.soapui.support.XmlHolder
def holder = new XmlHolder( messageExchange.responseContentAsXml )
def node = holder.getDomNode( "//Results[1]/ResultSet/*" )
def i = 1 as int
def uniqueIds = ['396775','449296','385430','648397','648396','449556','573080','648395','423574','648394','450236','573072']
def allIds = []
for( elementId in holder.getNodeValues( "//ELEMENTS_ID" ))
{
log.info "current elementId[$i] == [$elementId]"
allIds.add(elementId)
i++
}
assert allIds.containsAll(uniqueIds)
______
so once I'm happy with the content of the array allIds, I want to use this to assert against in my 2nd test Step