cancel
Showing results for 
Search instead for 
Did you mean: 

WsdlTestCaseRunner null pointer exception version 2.7.0

SOLVED
Highlighted
Occasional 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?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Occasional Contributor

Re: WsdlTestCaseRunner null pointer exception version 2.7.0

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

5 REPLIES 5
Community Leader

Re: WsdlTestCaseRunner null pointer exception version 2.7.0

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/

Occasional Contributor

Re: WsdlTestCaseRunner null pointer exception version 2.7.0

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

Community Leader

Re: WsdlTestCaseRunner null pointer exception version 2.7.0

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.

Occasional Contributor

Re: WsdlTestCaseRunner null pointer exception version 2.7.0

Hi ,

I hope this could help anybosy who is searching for the same solution.:

 

 

import com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext
import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner
import com.eviware.soapui.model.testsuite.TestCaseRunner

  • //def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );
    testCase1=context.testCase
    testSTEP=testCase1.getTestStepByName("MyTestStep")
    def properties = new com.eviware.soapui.support.types.StringToObjectMap ()
    testRunner = new com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner(testCase1, properties);
    testStepContext = new com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext(testSTEP);
    log.info testSTEP.run(testRunner, testStepContext).getResponseContent()
Occasional Contributor

Re: WsdlTestCaseRunner null pointer exception version 2.7.0

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

New Here?
Join us and watch the welcome video:
API Testing Mistake #2
APITestingMistake#2