Integration & End-to-End Testing with TestContainers and JUnit 5

The TestContainers library facilitates simple start up of a service dependencies, i.e. Postgres, Redis in throwaway Docker containers. This open source library works over Docker API and has a list of features which significantly improve a software developer experience.

Some of these features are:
* Docker environment autodiscovery
* mapping to random unique host ports
* easy Docker network configuration and sharing
* waiting strategies for a ready status – containers cleanup guarantees
* ready to use specific containers
* JUnit 5 integration

This talk discusses the above-mentioned features with code samples. The demo part shows integration tests for two services. They use Postgres and Redis under the hood, respectively. Another demo shows how it is possible to run both of the services in Docker containers at the same time together with their dependencies and to perform a simple end-to-end test.

Video producer: https://voxxeddays.com/

1 Comment on Integration & End-to-End Testing with TestContainers and JUnit 5

Comments are closed.