<div dir="ltr">My experience so far in moving to an SOA from a big Rails monolith is that you probably need to find a balance between stubbed clients and running requests through the entire stack.<div><br></div><div>When unit testing, and for initial smoke tests on the integration side, stubbing out responses works well to keep things moving quickly enough to give yourself a level of confidence, but that doesn't guarantee that the interface you're coding to actually corresponds with reality, so you'll find yourself needing to run the entire stack for integration testing as well. If anyone has any good advice on making that actually happen I'd love to hear it, because we've yet to reach a point of being happy on that side.</div>
<div><br></div><div>Jon</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 23 June 2014 19:46, Jonathan <span dir="ltr"><<a href="mailto:j.fantham@gmail.com" target="_blank">j.fantham@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi there,<div><br></div><div>I'd like to know if any of you have any advice for testing Service Oriented Architectures. Specifically the mocking of boundaries between services. Each team I've worked with in a SOA environment has a different approach to the way they isolate their services from each other for testing. E.g.</div>

<div><br></div><div> - use VCR to connect to the genuine service the first time and save a response</div><div> - create clients for your services, and use mock clients during testing, or stub the real clients explicitly in tests.</div>

<div> - create fake services that respond to the same interface as the real service but just return dummy responses (as in this talk <a href="https://www.youtube.com/watch?v=6mesJxUVZyI" target="_blank">https://www.youtube.com/watch?v=6mesJxUVZyI</a> around 11:45).</div>

<div><br></div><div>Each one seems to have its problems. The first is probably my preferred but I'm encountering some resistance to using it. The second and third are basically the same thing at a different level, and when I've seen these approaches used I've noticed they usually get very complicated. On occasion I've seen them end up with their own test suite.</div>

<div><br></div><div>How do you go about mocking out the interfaces between services in your projects so that test suites can run in isolation? Do you use anything different to what I've just mentioned?</div><div><br>
</div>
<div>Thanks!</div><div>Jono.</div><div><br></div></div>
<br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br></div>