Introduction
SoapUI has a very useful and easy-to-use REST and SOAP mock service functionality. This chapter looks to build on standard static response mocks by using Groovy scripting and database backends to provide dynamic responses that can also store and retrieve request data.
In terms of web service mocking as a strategy, the SoapUI online docs (see http://www.soapui.org/soap-mocking/service-mocking-overview.html) mention the pros and cons of using mock services to decouple web service dependencies during application development and testing cycles. As a counter point to the benefits of developing against mocks early on, I would suggest that vertical slicing (see http://en.wikipedia.org/wiki/Vertical_slice) should also be considered as an alternative strategy.
It can help mitigate some of the risks that early mocking can hide, for example, complexity in the form of data access and/or network connectivity issues. Also, using service stubs (see Chapter 1, Testing and Developing Web Service...