Forum Discussion

mmestre's avatar
mmestre
New Contributor
6 years ago

[Plugin] MockTestRunner listener

Hi,

I need to add a listener to be triggered when a single step is being executed from it's panel, to be executed before the TestStep.

When the step is a SOAP step, I have been able to add it using the SubmitListenerAdaptader. But I couldn't find how to implement a listener to be triggered when (e.g.) GroovyTestSteps or a JDBCTestSteps are being executed.

Runner class: com.eviware.soapui.impl.wsdl.panels.support.MockTestRunner

Context class: com.eviware.soapui.impl.wsdl.panels.support.MockTestRunContext

6 Replies

    • mmestre's avatar
      mmestre
      New Contributor

      nmrao 

      I've just read the plugin. It's an excellent idea. Congrats for it.

       

      Almost there, but I still can't trigger the listener when a groovy is being executed from it's panel. This is because, as you can see at your custom-listeners.xml, you are using the following listeners that run on the step execution at desktop panel:

      com.eviware.soapui.impl.wsdl.submit.RequestFilter:

      It's triggered when a Soap Test Step is executed, but not when the Step is JDBC or Groovy.

      com.eviware.soapui.model.iface.SubmitListener:

      As you can see in the "All Known Implementing Classes:" in the javadoc, it's implemented by the JDBC TestStep but not by the Groovy Test Step, so, it's listeners is being triggered when a JDBC is executed in it's own panel, but not when a Groovy is executed that way.

       

      "possibly nothing is available for Mock services though."

      But this issue is not related to Mock services but with the MockTestRunner, the runner created when a step is executed directly from it's own panel on the SoapUI desktop application.

       

      • nmrao's avatar
        nmrao
        Champion Level 3

        mmestre,

        Groovy Script test step is different from SOAP / REST / HTTP / JDBC request steps and that only executes some  business logic and mostly does not call external systems like the others. That's why listener have no control for the same.

        Would you mind posting your actual use case? That probably help me to understand the case better.