Ask a Question

NullPointerException at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep

Occasional Contributor

NullPointerException at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep


I am stuck with below error . I am calling a groovy test step from assertion of a Test Step and this groovy test step is calling another test case . it is running but below exception is coming .


Just sample code .


Test Step 1 - >  In assertion calling another test step based on some conditions



Test step 2 (VerifyAddress)

      //calling another step based on few conditions

     def key = context.testCase.testSuite.project.testSuites['Keywords_Addresses'].testCases['ApproveAdress']


     def runner = null, true )


Thu Apr 29 22:53:32 IST 2021: ERROR: java.lang.NullPointerException java.lang.NullPointerException at at com.eviware.soapui.model.testsuite.TestStep$run$ Source) at at at$ at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.assertScript( at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.internalAssertResponse( at com.eviware.soapui.impl.wsdl.teststeps.WsdlMessageAssertion.assertResponse( at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.assertResponse( at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.setResponse( at at com.eviware.soapui.impl.wsdl.panels.teststeps.RestTestRequestDesktopPanel.afterSubmit( at com.eviware.soapui.impl.wsdl.WsdlSubmit.notifyListenersAfterSubmit( at at java.base/java.util.concurrent.Executors$ at java.base/ at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker( at java.base/java.util.concurrent.ThreadPoolExecutor$ at java.base/

Champion Level 3

If I were into your shoes, I would use the script assertion itself (my understanding is that call a groovy script from script assertion) and not call another groovy script. And also avoid having dependency on another test case.

Please check if it is possible to re-design the test to be independent.

Is it possible to crate sample project to reproduce the issue?

Community Hero

@kannan : I agree with @nmrao , the approach which you are using doesn't looks good as :


1. All the test steps should be independent and

2. Calling a test step from a script assertion is not a good decision.


You should move the logic of calling another test step to a separate groovy script

Let me know in case more help is needed, would be happy to help 🙂


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓

Thanks and Regards,
Himanshu Tayal
Occasional Contributor

Yea ! I have already moved it to a different test step but I just wanted to
understand why it is throwing this error .
Champion Level 3

Not possible to comment without the code written in script assertion and groovy script test step.

Showing results for 
Search instead for 
Did you mean: