mbennison85
7 years agoOccasional Contributor
WsdlTestCaseRunner null pointer exception version 2.7.0
The following Script worked fine in 2.6.0 but since upgrading to 2.7.0
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );
def testCase = testRunner.testCase;
def testStep1 = testCase.getTestStepByName("Check Quote Processed");
testRunner = new com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner(testCase, null);
testStepContext1 = new com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext(testStep1);
def result = context.expand( '${Check Quote Processed#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/BATCHPROCESSINGSTATUSID[1]}' )
def count = 0
while (result != "1") {
log.warn(result, result)
testStep1.run(testRunner, testStepContext1);
result = context.expand( '${Check Quote Processed#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/BATCHPROCESSINGSTATUSID[1]}' )
sleep(5000);
count = count + 1;
if (count == 10) {
break;
}
}
assert result == "1"
log.warn(result, result)
Specifically now
testRunner = new com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner(testCase, null);
Gives a NullPointerException.
WsdlTestCaseRunner(WsdlTestCase testCase, StringToObjectMap properties)
StringToObjectMap allows null
Any advice?
The fix i got from Smartbear was
testRunner = new com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner(testCase, new com.eviware.soapui.support.types.StringToObjectMap())
A bug has been raised with them and will be fixed in a future release