How would you create a mock for an Aggregator Microservice (stateless) which makes requests to other services for each request, transforms the data and then responds to the user?
I want to create a mock service where I don't t have to run the other services but it should create kinda realistic responses.
Have you had to create something like this?
I'd use it for testing another microservice that uses the aggregator.

  • 4
    i probably wouldn't mock a service, but just the methods that make calls to these services

    I think it achieves the same end goal?
  • 1
    Have a look at stoplightio/prism in GitHub. Surely you have the other services api allready documented and with this you can create a mock service out of the doku.
    You can also create mock services with Swagger itself or Postman.

    Also what iceb said.
  • 0
    I’ve been using Smoke https://github.com/sinedied/smoke as a mock server since an year now, one of the best frameworks available.
Add Comment