Forum Discussion

Finan's avatar
Finan
Frequent Contributor
15 years ago

Blocking exception during initiation of MockResponse

I have several testcases that make use of a MockResponse step. Sometimes the step runs fine, on other occasions SOAPUI throws a NullPointerException during the initiation of the MockResponse teststep. This NullPointer seems to be caught at a high level, causing the MockResponse to remain active while it should have been stopped. At that point it becomes impossible to run any testcase that makes use of a MockResponse teststep. The teststep that threw the exception still has an active listener, while the teststep itself is no longer active. Therefore this is blocking until I have restarted SoapUI.

The occurance of this NullPointerException comes rather random (i.e. it doesn't happen every time, and not always at the same step, but it does happen very often (i.e. around 1/4 times I run my test, and 1/1 times when I run a full regression).

This concerns the following exception:

Fri Jun 24 14:11:52 CEST 2011:ERROR:Exception during Test Execution
java.lang.NullPointerException
at com.eviware.soapui.impl.wsdl.teststeps.WsdlMockResponseTestStep$InternalTestRunListener.beforeStep(WsdlMockResponseTestStep.java:1450)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:226)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:48)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:141)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:42)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Fri Jun 24 14:12:06 CEST 2011:ERROR:Could not get binding for myMockResponseStep

Can you please take a look at this issue? It's highly blocking to our regression testing. So apart from the NullPointerException itself, please take a look at the actual stopping of the listener in case an exception would occur. It is not workable having to forcefully kill the listener by restarting the application.

Thanks!

5 Replies

  • Hi!

    thanks for this - do you get this with the 4.0 version or are you using a previous release?

    regards,

    /Ole
    eviware.com
  • Finan's avatar
    Finan
    Frequent Contributor
    This was first noted in a 3.5.1 soapUI pro version, but it is reproducible in the 4.0.0 final version.
  • Finan's avatar
    Finan
    Frequent Contributor
    Sadly we had to create a work around, so the project is no longer close to what it was. We decided to not use the MockResponse steps. In essence, the setup was:

    Testsuite A
    - Testcase A
    * Teststep with MockResponse A
    Testsuite B
    - Testcase B
    * Execute Testcase A
    * Teststep with MockResponse A
    * Teststep with MockResponse B
    * Teststep with MockResponse C

    I hope this is enough information to reproduce it.