Forum Discussion

mbennison85's avatar
mbennison85
Occasional Contributor
6 years ago

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?

 

  • mbennison85's avatar
    mbennison85
    6 years ago

    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

  • Radford's avatar
    Radford
    Super Contributor

    If this is an issue that was OK in 2.6 but is a problem in 2.7 I would recommend raising a support incident with SmartBear at as it sounds like it could be a bug/regression that has been introduced with the new version:

     

    https://support.smartbear.com/product-list/

    • mbennison85's avatar
      mbennison85
      Occasional Contributor

      Ticket has been raised with them, was hoping someone has already managed to find a way around the issue.

      • Radford's avatar
        Radford
        Super Contributor

        Good call, always worth an ask.

         

        I do know that there is the mainenance build, which includes fixes released between version:

         

        https://support.smartbear.com/downloads/readyapi/maintenance

         

        Though as far as I know there is not a list of fixes it contains. Even when I had to use the maintenance build to fix an issue I had with an older build, I was unable to fnd out what else was included.