Integration Tests with Docker Testcontainers

By Kevin Wittek

30. 09. 2021 from 15:45 CET

About the presentation

Unit testing is fine, but without proper integration testing, especially if you work with external resources like databases and other services, you might not know how your application will actually behave once it has been deployed to the real production environment.
Before Docker, configuring the environment for integration testing was painful – people were using fake database implementations, mocking servers, usually it was not cross-platform as well. However, thanks to Docker, now we can quickly prepare the environment for our tests.

In this talk I would like to show how you can use Testcontainers – a popular Java testing library that harnesses Docker to easily, reliably, spin up test dependencies.

Key takeaways


  • How you can use Testcontainers
  • How to setup a development and testing environment without the need to install external applications
  • That nowadays using real software for integration tests might sometimes be preferable over mocking out external dependencies

Who will benefit?

Developers and Test Automation Engineers

Expected knowledge

  • Java and Docker

About Kevin Wittek

Testcontainers co-maintainer, passionate about FLOSS, containers and Java. Oracle Groundbreaker Ambassador. Likes to write Python programs to support his wife in performing behavioral science experiments with pigeons. Plays the electric guitar and is a musician in his second life. After many years working in the industry as an engineer, Kevin is now doing his Ph.D. in computer science in the field of distributed systems engineering at the RWTH Aachen University and is leading the Blockchain Lab at the Institute for Internet Security in Gelsenkirchen, Germany at the Westphalian University of Applied Sciences.