I have recently created some test cases for asynchronous, message-driven services with Lisa Test. In these test cases I send a JMS message to a queue, let the SUT process it, consume the resulting JMS message from the destination queue and finally make XPath assertions on the received XML message. So far, so good.
For further test cases the SUT does not (or not only) create a resulting message, but calls for example another system by webservice or writes to a database. These calls must not reaching the backend system. Either I can gulp the calls with Lisa Test or I have to redirect them to a Lisa service virtualization. Reason for this is that the test must be independent from the real backends. In fact the backend systems would not accept the same write call twice, so to repeat the same tests again and again, I have to decouple the backends to avoid test failures due to duplicate write calls.
Therefore I need to capture the "remote calls" to be able to make assertions. For a database call I imagine to capture the DAO method call and assert the parameter values. For a webservice call I expect to capture the webservice call and assert the request message for correct values.
How can I do this with Lisa? Can I capture calls with Lisa Test? Can I make assertions based on a request against a Lisa service virtualization?
Thanks for any advice