Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore integration and end-to-end testing techniques using TestContainers and JUnit 5 in this comprehensive 59-minute Devoxx conference talk by Nikolay Kuznetsov. Learn how TestContainers simplifies the process of starting service dependencies like Postgres and Redis in disposable Docker containers. Discover key features such as Docker environment autodiscovery, random port mapping, network configuration, waiting strategies, and container cleanup. Dive into code samples and witness live demonstrations of integration tests for two services utilizing Postgres and Redis. Gain insights into running multiple services simultaneously in Docker containers for end-to-end testing. Master JUnit 5 extensions, testing environment clusters, and Docker network aliases to enhance your testing capabilities. Walk away with valuable takeaways to improve your integration and end-to-end testing practices.
Syllabus
Intro
Why integration testing?
Basic integration test
Integration testing evolution
Docker advantages
Start Docker containers for integration test
Maven plugins
Docker Compose
Docker API
Docker environment discovery
Host port randomization
Containers cleanup
Waiting strategies
Host port waiting strategy
Demo recap
JUnit 5 extensions
Testing environment cluster
Test cluster for automated E2E tests
On-demand cluster for E2E tests
Non-Kubernetes for E2E tests
Docker network aliases
Spring Cloud Eureka service names
Takeaways
Taught by
Devoxx