Forum Discussion
SmartBear_Suppo
Alumni
15 years agoHi!
I think the reason for this is that you are assuming that
""+teststep+"#Response"
will always resolve to an actual response; if the teststep has not been run or if the testStep is of a type that doesn't have a response you will get this error
maybe you could modify your script to contain:
...
for (int i in 1..<StepCnt)
{
def step = context.testCase.getTestStepAt(i)
if( step instanceof com.eviware.soapui.model.testsuite.SamplerTestStep && step.testRequest.response != null )
{
holder = groovyUtils.getXmlHolder( step.name+"#Response")
}
}
...
Does that help?
regards,
/Ole
eviware.com
I think the reason for this is that you are assuming that
""+teststep+"#Response"
will always resolve to an actual response; if the teststep has not been run or if the testStep is of a type that doesn't have a response you will get this error
maybe you could modify your script to contain:
...
for (int i in 1..<StepCnt)
{
def step = context.testCase.getTestStepAt(i)
if( step instanceof com.eviware.soapui.model.testsuite.SamplerTestStep && step.testRequest.response != null )
{
holder = groovyUtils.getXmlHolder( step.name+"#Response")
}
}
...
Does that help?
regards,
/Ole
eviware.com