Forum Discussion
DMc-Cabe
11 years agoOccasional Contributor
DMc-Cabe wrote:
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
I've even tried adding a property step called 'targetIds'
The I added the following line to my assertion above :
messageExchange.modelItem.testStep.testCase.getTestStepByName("targetIds").setPropertyValue(allIds,allIds)
this is returning the following error :
No signature of method: com.eviware.soapui.impl.wsdl.teststeps.WsdlPropertiesTestStep.setPropertyValue() is applicable for argument types: (java.util.ArrayList, java.util.ArrayList) values: [[666, 2109, 2108, 21, 445, 2207, 2218], ...]
Possible solutions: setPropertyValue(java.lang.String, java.lang.String), getPropertyValue(java.lang.String)