1

I'm started reading the Mountebank framework for our project which uses Microservices. Based on my learning on few days, Mountebank is mainly based on testing micro services using a concept of service virtualization.

To test the Rest APIs we can use Rest Assured.

I want to take seminar about the framework and I need an answer for the question why don't we use Rest Assured, even in RestAssured, we can use mock? so what are the major differences and similarities between Mountebank and Rest Assured?

I'm not sure whether it is valid to compare Mountebank and RestAssured.

irs102info
  • 526
  • 1
  • 6
  • 16

1 Answers1

3

Your instinct is correct - Rest-Assured and mountebank solve different problems. In fact, both were used in conjunction on the first project to use mountebank.

Rest-Assured provides a nice domain specific language for testing RESTful services. It's basically a wrapper over HTTP calls and JSON parsing that simplifies your test workflow for you when you want to test a REST service over the wire.

In a microservices architecture, that REST service you're testing likely makes call to other downstream services, which can introduce non-determinism into your test suite. That's where mountebank comes in. It can provide a test double for that downstream service, allowing your first set of behavioral tests to be deterministic. It's effectively stubbing over the wire.

The two tools can work nicely together: Rest-Assured calls your REST service, and mountebank stubs its downstream dependencies.

bbyars
  • 406
  • 3
  • 3