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

Testing Spring Boot Microservices

Testing Spring Boot Microservices

Practical experiences testing Spring Boot microservices

Alberto C. Ríos

May 08, 2018
Tweet

More Decks by Alberto C. Ríos

Other Decks in Programming

Transcript

  1. CT Testing a stand-alone service Controller Service Repository Mock Controller

    Mock Service HTTP API Controller Repository DB IT UT HTTP API DB
  2. When do we use Test Doubles? Service Mock Repo Unit

    tests. Scope: class Stub External Dep Component tests. Scope: whole service Unit Unit Service Http Client Controller
  3. What is a contract check? Billing Service User Service Contract

    Check Can the service consume its external dependencies?
  4. What is a contract check? Billing Service User Service Contract

    Check Service HTTP Client Controller User Service Can the service consume its external dependencies? Billing Service
  5. CT Testing a service with an external dependency Controller Service

    HTTP Client Mock Controller Mock Service Mock HTTP Client HTTP API Controller HTTP Client Real User Service IT UT CC Controller Service Repository HTTP API DB