Creating a custom RequestFilter (Listener) plugin
Custom event listeners allow for extensions that run when things (events) happen in the SoapUI framework. There are certain situations where this can be a nice way to add functionality. Typical examples would be cross cutting concerns; for instance, additional custom logging after a test has run (TestRunListenerAdapter
) or modifying a request before a request is dispatched (RequestFilter
). In this recipe, we'll first take a quick look at the various types of Listener
interfaces, then code a simple plugin to use a RequestFilter
to intercept a REST request; and log its URI and add a new parameter to it before the request is dispatched.
All Listeners
extend the SoapUIListener
interface. The current ...
Get SoapUI Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.