I've two test case A and B under one test suite
I am setting the context property in script assertion of one of the test step of B
def holder = new XmlHolder( messageExchange.responseContentAsXml )
context.setProperty("xmlHolder", holder)
I am getting the context property in script assertion of one of the test step of A
def Holder=context.getProperty("xmlHolder")
log.info(Holder)
but the value of "Holder" is printed null
I just want to set it in one TC and get it in the other one.
EDIT Found this , and I was trying to set property like this. I already had a Runner created in script assertion.
Runner.getTestCase().setPropertyValue("xmlHolder", holder)
But receiving a null error
I could do
Runner.getTestCase().setPropertyValue("xmlHolder", "A")
Just wondering , if TC properties can hold an Object compare to string. So, my original question remains as it is.
Runnervariable is not available, insteadrunneris available. In my opinion, soapUI only holdsStringToStringMap, so can't hold objects in test case / test suite / project level properties. You may try saving response string directly. Later, read that and convert it toXmlHolderobject. - RaoWsdlTestRunContextbe used to share context between TC. Got the information on net, but haven't tried it yet. Just thought you might have an idea about it. - user1207289context.testCase.testSuite.setPropertyValue('RESPONSE_FOR_LATER_USE', messageExchange.response)- Rao${#TestSuite#RESPONSE_FOR_LATER_USE}when needed in other locations within the same suite. - RaoNo signature of method: com.eviware.soapui.impl.wsdl.WsdlTestSuite.setPropertyValue() is applicable for argument types: (java.lang.String, com.eviware.soapui.impl.wsdl.submit.transports.http.support.attachments.WsdlSinglePartHttpResponse) values: [RESPONSE_FOR_LATER_USE, com.eviware.soapui.impl.wsdl.submit.transports.http.support.attachments.WsdlSinglePartHttpResponse@9ffac9a] Possible solutions: setPropertyValue(java.lang.String, java.lang.String), getPropertyValue(java.lang.String)on setting up the property. - user1207289