07 November 2008 - 2.5-beta2 user guide blog eclipse intellij netbeans maven PDF files forums bugs sourceforge eviware.com


Eviware Logo

Web Service Mocking

In soapUI 1.7 we introduced the possibility to create Mock Implementations, or Web Service Simulations, (called "MockServices") of any Web Service from its WSDL contract. A soapUI MockService can expose an arbitrary number of operations ("MockOperations") from different WSDLs which can further be configured quite extensively in regard to which response(s) ("MockResponse") they should return, including the possibility to create custom Groovy scripts for both dispatching and response creation. MockServices can be hosted/run either directly in soapUI or via the command line MockServiceRunner and be invoked from any client (including soapUI itself of course) as usual.
Simulated Web Services - Mock Response

Mocking of Web Services opens for a number of interesting usage scenarios:

  • Client development or testing - create a MockService for an existing contract that returns a number of predictable results which can be used by client developers/integrators during the development phase.
  • Test Driven development from WSDL contract (both server and client) - Starting from only a WSDL, generate both client and server stubs (using any of the soapUI tool integrations) together with a MockService which can be used to build entire functional TestSuites in soapUI before the actual service implementation is ready.
  • Web Service rapid prototyping - Quickly create simple WSDL implementations for discovering optimal message exchanges, etc
  • etc..

soapUI Pro further introduces a MockResponse TestStep which can be added to any functional TestCase to simulate the handling of a SOAP request as part of the test, which opens of testing of asynchronous Web Services, etc.


Next: Getting Started with Mock Web Services