Service stubs can easily be implemented using Masquerade. Simply run Masquerade standalone using its embedded Jetty server or deploy it to an application server (e.g. Tomcat) of your choice, and configure your simulations using its web interface.
Service simulation is useful for example when
- Providing a service stub for integration or regression tests
- Doing functional tests against a system that is not (yet) available
- Providing a stub for functionality that is yet to be implemented in an agile project
Supports the following request listener channels in this first release:
- HTTP (using the servlet container and standalone on different port)
- JMS (queue/topic, connection factories for WSMQ and ActiveMQ included)
Contains simulation actions for various request/response scenarios, while quite a few of them support XML, any kind of response can be simulated. Response simulations are based on simulation scripts that contain actions such
- Template-based response
- Adding content to the response
- Groovy script step
- Ruby script step
- Java Script step
- Synchronous/asynchronous responses
- Wait step
- Variable management and substitution steps
- XML transformation steps
The simulator also provides an API to query for received requests (useful when asserting request contents in integration tests), and to specifiy expected responses externally before issuing requests.
The Source code repo is at https://github.com/matf/masquerade.