Skip to content
StackDecode
System Design
11. Microservices ArchitectureAnimated

Microservice Testing

Testing many services together.

The idea

Use unit tests, contract tests, integration tests and a few end-to-end tests.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

ClientAPI gatewayUsersOrdersPaymentsDBs
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Clients call one entry point.

step:
1/4
at:
Client
1/8

The green dot is a request moving through the system.

Step by step

  1. 1Unit test each service
  2. 2Verify contracts between services
  3. 3Integration test with real dependencies
  4. 4Run few end-to-end checks

Where it is used

Quality at scale.

Watch out for

Too many end-to-end tests are slow and flaky.

Related