Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Contract Testing and Messaging with Spring Cloud Contract
Rating: 5.0 out of 5(4 ratings)
24 students

Contract Testing and Messaging with Spring Cloud Contract

Learn how to use Spring Cloud Contracts to create reliable integration tests for message-based communications.
Last updated 11/2024
English

What you'll learn

  • Create integration tests using contract testing for message-based communication
  • Learn the basics of RabbitMq
  • Learn to programmatically implement RabbitMq with Java
  • Learn to program integration tests using TestContainers

Course content

3 sections12 lectures2h 4m total length
  • Introduction1:01

    Explore how Spring Cloud Contract extends testing from HTTP to message based communications, and preview a three-section course covering a prepared consumer and producer project, RabbitMQ basics, and contract testing.

  • Introduction to Course’s Project1:22

    Explore a two-app project that models a bus as the producer and a bus stop as the consumer, using a queue to carry location messages and compute the eta.

  • Producer Side Code Presentation8:16

    Expose producer side code for sending bus location events to RabbitMQ with Spring Boot; the location sender publishes JSON payloads with lat/long and headers every five seconds.

  • Consumer Side Code Presentation7:34

    Explore the consumer side of contract testing with Spring Cloud Contract, using a location receptor to process bus events from RabbitMQ and compute ETAs via an arrival time estimator.

Requirements

  • Have completed the previous course Contract Testing with Spring Cloud Contract
  • Mid level knowledge of java language
  • Spring boot (Core and Testing)
  • Unit testing (JUnit/Mockito)

Description

In our previous course, Contract Testing with Spring Cloud Contract, we delved into how Spring Cloud Contracts can be a powerful tool for creating reliable contract tests specifically for HTTP communications. By implementing these tests, you can provide confidence to your team during production releases and create solid integration tests that reduce dependencies on other teams. However, contract testing with Spring Cloud Contracts isn’t limited to just HTTP. This course focuses on extending the power of contract testing to message-based communication—a critical area for ensuring stability and reliability in distributed systems.

We’ll take you through hands-on examples using two small applications that communicate through RabbitMQ, guiding you in setting up contract tests for these message-based integrations. If RabbitMQ is new to you, there’s no need to worry; we’ll start with a primer on RabbitMQ basics before diving into the contract testing specifics. After this course, you will be able to implement contract testing regardless of the message broker your project is using (Kafka, ActiveMQ, SQS, etc).

To fully harness the value of this course, you should ideally have a foundation in Java, basic Spring Boot, and be familiar with unit testing concepts, particularly with tools like Mockito and JUnit. This background will help you maximize the course's insights and apply them effectively to your own projects.

Who this course is for:

  • Java Devs who want to learn to do proper integration testing messaging-based communications
  • Students who want to learn basic RabbitMq