Forum Discussion
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.
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.
- mmestre6 years agoNew Contributor
I developed a listener that, on runtime, copies the custom properties from different project levels to the running context.
Example: If in the custom properties of the Project I have a property called "mailAddress" with the value "project address", then when I call the property from a request using ${mailAddress} when running it will be converted to the text "project address" without needing to point to the project using ${project#mailAddress}.
Also, if I put a custom property with the same name in a TestSuite or a TestCase, when running the same request it will get the value from the "most specific" level (first it will use the value from the TestCase, if it doesn't have the property it will use the value from the TestSuite, if it doesn't have the property it will search it in the project or in the global properties).
This is very useful to change the values of the tests without modifying the requests.
I have it working with every runner, with the exception of the runner created when running a Groovy Script from it's desktop panel play button. Thanks to you, this is the only one that doesn't have the property created on it's context.
Can you help me implementing the listener in that last runner? Thank you.
Related Content
Recent Discussions
- 14 days agosmilnik