Stubbing strategy for multiple web services?

1.8k Views Asked by At

We have a business heavy front end to a light web service that interacts with many other web services.

Rather than spinning up 4+ applications each time we're developing something on any of the services we want to have a stubbing framework, one that can be reused for most of the services, allowing for a development (& hopefully reusable for testing) in somewhat isolation.

So stubbing the http requests seems like the best strategy.

I've been looking at Mockey, stubby4j & Wiremock (can't post more links) but wanted to ask for Overflow's perspective and see if those who had gone through a similar challenge had any advice.

1

There are 1 best solutions below

2
On

I've been using WireMock recently and am very impressed -- it allows very declarative expression of stubbed responses, and verification of requests. It's like Mockito for HTTP. That being said, my use has been primarily in unit and integration tests, and it sounds like you plan on using it as a fake for local development. I suppose it should still work in your case, but I'd be curious to see how well it holds up in practice.