Elegant integration testing of microservice pandemonium using TestContainers and JUnit 5 through the example of global SMS platform

Day 2 /  / Track 3  /  RU / For practicing engineers

In this talk we'll discuss a system testing approach for platform consisting of several microservices. For the demonstration we are going to use simplified prototype based on Infobip corporate platform. We run our services in Docker containers, using TestContainers library and JUnit 5 framework. Our services are built on Spring Boot 2 and connect with each other using Ribbon and Eureka from Spring Cloud. We also use Postgres and Redis databases and MockServer for mocking.

For each service we create JUnit 5 Extension, so the respective container can be lifted by simply putting an annotation in the beginning of the test. Adding and removing annotations, you could write quite elegant tests both for one service, the subsystem, and for the whole platform. Company gets its profit especially when the process covers interactions of several microservices, which make the most money. Developers get an opportunity to run tests on new version of their service and stable production versions of the rest, and also additional confidence before deploying into production.

This talk's aimed at people who are interested in microservices or work with them. The former will learn about concepts existing in this area, present problems and their solutions. The latter could get some new ideas on how to make their own lives easier, deploy into production faster and more often and suffer fewer problems.


Download presentation