03 December 2007 - 2.0-beta2 home user-guide eclipse jbossws intellij netbeans maven 1.X/2.X PDF files forums bugs sourceforge






Web Service Mocking

soapUI 1.7 introduces the possibility to create Mock Implementations (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.

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

  • Client development / 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: Mock Services