Forum Discussion

Philippe_Marste's avatar
Philippe_Marste
New Contributor
16 years ago

MockResponse support for HTTP

Does soapUI support or plan to support mocking of HTTP response?

The use case is following:

we expect the server to send soapUI on a specific HTTP port a HTTP request, based on which we want to mock specific HTTP responses. The dispatching of HTTP response would follow the same feature-set than soap response dispatching.

Basically, something very similar that already exists for SOAP but that would not depend on Interface/SOAP, but simply based on HTTP request content.

Let me know if this is planned in the near future, and how to achieve this using Groovy Script in the meantime. I already found a way to code in the onRequest script of the Mock Server some code to HARDCODE the HTTP response, but would prefer a full-fledged version like we have with SOAP, such as a MockHTTPResponse step (same as MockSoapResponse step).

Thanks and Regards,

Philippe

1 Reply

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Philippe!

    Definitely, we just didn't manage to squeeze it into the schedule for this release, which was already way late.. Mocking HTTP Responses currently can be done either with an onRequest script as you have done, or by using the docroot setting in the MockService options dialog for mocking static content. Ultimately there will be another tab in the MockService editor named "Resources" containing a list of MockResources which in turn dispatch to MockHttpResponses.. (or something..), and an accompanying HttpMockResponse TestStep. Any further ideas/suggestions are of course always welcome!

    regards,

    /Ole
    eviware.com