This is another awesome Java library that every Java developer should learn in 2023. If you don’t know, Tescontainer is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
If you are wondering why do we use Testcontainers or why do we need it then let me tell you that Testcontainers will allow us to write integration tests making use of containerized databases, message queues, web browsers, etc. without a dependency on a local installation
It really makes testing setup easier than ever before, particularly for testing spring boot applications. If you want to learn more about testing the spring boot apps using test contains then I suggest you join Spring Boot Testing Masterclass by RieckPil, one of my favorite courses to learn advanced testing stuff for Java developers.
This course will teach you everything you need to know about testing the spring boot app, including test containers. You can also use my code TSBAX_M2LAP to get a 10% discount.
Here is the link to join this course: Spring Boot Testing Masterclass