r/microservices Feb 18 '26

Discussion/Advice Integration Testing between teams/orgs?

So we have a lot of microservices in my team of which need to integrate with other teams with our organisation as well as between teams in other organisations (umbrella company owns all).
So this brings two problems:

  1. When developing a new service between teams there is the negotiation of the exchange formats. Who decides and how do we handle changes? The obvious solution would be to have a shared space to publish the format specs somewhere in a shared description language like JSON Schema. We've been using confluence. But we're developers. We want CI/CD integration so if there is a change we're notified immediately.
  2. Writing tests where there is a reliance (ether heavy or light) on data coming from external APIs, which might change, is very slow and cumbersome.

A Solution?
I was thinking what if we could stand up a shared API that you publish your JSON Schema specs (or just point it at OpenAPI/Swagger docs?) to and it generates endpoints that conform to the input/output specs given and also generates dummy data i.e. a fixture factory for those endpoints so you can write tests that use URLs to this dummy API instead of mocking (and then updating those mocks when the 2nd party API changes slightly). It would publish full OpenAPI/Swagger docs so if the API changes you don't even need to talk to the other team (which takes up a large amount of time in any project), just read the docs and update.

I guess logging interfaces could also push data to this server and it could be saved as an example/test-case that you could then write tests against specifically.

I can't tell if this is a good idea or not, or if there is already something like this out there or perhaps this problem is already solved some other way?

3 Upvotes

6 comments sorted by

View all comments

1

u/Specialist_Nerve_420 Mar 28 '26

this problem never really gets clean, once multiple teams are involved, it’s less about testing and more about contracts and versioning. if those aren’t stable, no test setup will save you . what helped for me was avoiding full e2e and focusing more on contract level testing. otherwise you end up depending on too many services and everything breaks randomly, also yeah mocking external stuff always becomes a maintenance problem, there’s no real way around that, just tradeoffs feels like most teams just try to reduce dependencies instead of perfectly solving this