srinivas_das_l
16 years agoContributor
Updating testStep from testSuite - Teardown script ??
Hi All,
I can't able to update request values of a testStep from TestSuite -teardown script .When i execute following code
in logs ,It's showing element is updated but actually it remains the same .
Can anyone tell me the way ,how to do it ??
Code :
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def request1 = testSuite.getTestCaseByName("Test Case").testSteps["teststep"].testRequest
def requestContent = request1.requestContent
def holder = groovyUtils.getXmlHolder(requestContent)
def h = holder.getNodeValue("//man:customerId")
def y= holder.getNodeValue("//man:customerId")
holder.setNodeValue("//man:customerId","234")
holder.updateProperty()
but it's not updating
I can't able to update request values of a testStep from TestSuite -teardown script .When i execute following code
in logs ,It's showing element is updated but actually it remains the same .
Can anyone tell me the way ,how to do it ??
Code :
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def request1 = testSuite.getTestCaseByName("Test Case").testSteps["teststep"].testRequest
def requestContent = request1.requestContent
def holder = groovyUtils.getXmlHolder(requestContent)
def h = holder.getNodeValue("//man:customerId")
def y= holder.getNodeValue("//man:customerId")
holder.setNodeValue("//man:customerId","234")
holder.updateProperty()
but it's not updating