Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Evolving distributed systems

Evolving distributed systems

Avatar for Zoltan Altfatter

Zoltan Altfatter

March 08, 2019

More Decks by Zoltan Altfatter

Other Decks in Technology

Transcript

  1. Testing microservices • Deploy all microservices and perform end to

    end tests • Mock other microservices in unit / integration tests
  2. Deploy microservices to perform end-to-end tests Advantages - simulates production

    - real communication between services Disadvantages - long to run and set up - hard to debug
  3. Mock other microservices in integration tests Advantages: - no infrastructure

    requirements - fast feedback Disadvantages: - you can go to production with passing tests but failing badly - the used services are mocked which might nothing to do with the reality
  4. Consumer driven contract - The consumer describes to the service

    what he needs in a form of an executable integration test that describes how the consumer uses the service
  5. Spring Cloud Contract Verifier + StubRunner - Ensures that HTTP

    / Messaging stubs are doing exactly what the actual server-side implementation will do - Provides a way to publish changes in contracts that are immediately visible - Promotes acceptance test driven development - Generates boilerplate test code used on the producer side
  6. WireMock • WireMock is a simulator for HTTP-based APIs. •

    We can run WireMock within our Java application • Has the ability to return canned HTTP responses for requests matching criteria • We can run the WireMock server in its own process