Many teams working with microservices need confidence they don't break functionality when making changes. System integration tests, functional tests, and sometimes manual tests are older ways to obtain that confidence. These processes may take more than 1 day or even more if different teams or a different company own the services.

To ensure the same level of confidence and speed up delivery, we can create Contracts for integrations between consumers and providers. Contracts created by consumer services need to pass with every build going in production to guarantee the integrations between systems/services work fine. Checking these contracts in a CI/CD pipeline makes feedback loops even faster.

A Contract is a collection of agreements between a Consumer and a Provider that describes the interactions that can take place between them. Consumer Driven Contracts (CDCs) is a pattern that drives the development of the Providers from its Consumer's point of view. It is TDD for microservices.

This workshop covers an end to end demo of contract testing between two microservices to show how to release microservices with confidence, get early feedback, speed up delivery, and comparison with other testing strategies.

I am going to use the PACT (https://docs.pact.io/) tool for implementing Consumer-Driven Contract Tests. The workshop will include an exercise from participants to implement the CDC.

Happy CDC!

 
 

Outline/Structure of the Workshop

  1. Introduction to microservices common testing strategies with their pitfalls
  2. Introduction to Consumer-Driven Contract Tests
  3. How CDC helps in speeding up the Continuous Delivery
  4. Introduction to PACT https://docs.pact.io (CDC tool)
  5. Demo of CDC for two microservices integration.
  6. Exercise implementing test & executing it against microservices
  7. Putting CDC in CI/CD workflow.
  8. Q&A

Learning Outcome

  1. New testing strategy to fasten continues delivery
  2. Understanding multiple testing approaches
  3. Deploying services autonomously with confidence
  4. Understanding contract testing with example & exercise
  5. Introduction to PACT tool
  6. Automating service dependencies
  7. Putting CDC in CI/CD workflow

Target Audience

Developers, Testers, Quality Analyst

Prerequisites for Attendees

- Little knowledge about Java 6 or later version

- Laptop with Java (6 or later version), IDE (Eclipse or IntelliJ Idea) installed on it.

- Charging points for participants laptops

schedule Submitted 3 months ago

Public Feedback

comment Suggest improvements to the Speaker
  • Aino Corry
    By Aino Corry  ~  3 weeks ago
    reply Reply

    Hi Gopinath, thank you for your submission

    I am a bit worried, that contracts for integrations between microservices is a splendid idea, but impossible to implement due to extra work?

    • Gopinath Langote
      By Gopinath Langote  ~  3 weeks ago
      reply Reply

      Hello Aino,

      As this is workshop for 4 hours, it is possible to do hands-on exercise to implement contract testing on micro-services (pre designed before workshop).

       

      I have managed to do this multiple times and internal meetups and conference.

       

      The best time frame is 1 entire day, to explore most of the contract testing but it is managable in 4hrs with limited scope.

      Let me if you need any extra information from my side. 


  • Liked Gopinath Langote
    keyboard_arrow_down

    Gopinath Langote - Confidently Releasing Microservices With Consumer-Driven Contract Testing

    Gopinath Langote
    Gopinath Langote
    Software Engineer
    N26 GmbH
    schedule 3 months ago
    Sold Out!
    45 Mins
    Talk
    Beginner

    Many teams working with microservices need confidence they don't break functionality when making changes. System integration tests, functional tests, and sometimes manual tests are older ways to obtain that confidence. These processes may take more than 1 day or even more if different teams or a different company own the services.

    To ensure the same level of confidence and speed up delivery, we can create Contracts for integrations between consumers and providers. Contracts created by consumer services need to pass with every build going in production to guarantee the integrations between systems/services work fine. Checking these contracts in a CI/CD pipeline makes feedback loops even faster.

    A Contract is a collection of agreements between a Consumer and a Provider that describes the interactions that can take place between them. Consumer-Driven Contracts (CDCs) is a pattern that drives the development of the Providers from its Consumer's point of view. It is TDD for microservices.

    This talk covers where and where not to do contract testing, backed up by real project experiences. The experience in doing contract testing at scale, mistakes, lessons learned are the core of the talk.

    Happy CDC!