Testcontainers and Spring Boot for local development and integration testing

Published: 01 January 1970
on channel: AtomicJar
15,591
356

We can't believe it either, but in this live stream we welcome, Josh Long. Josh is a Spring Developer Advocate, Java Champion, Kotlin Google Developer Expert, author of numerous books, best-selling video trainer, open-source contributor, podcaster and YouTuber!
In this episode we looked at adding integration tests to a Spring Boot application, explored a few approaches how Testcontainers allows to manage the lifecycle of the docker dependencies, like a database, tried Testcontainers Cloud to decouple the environments where tests are run and where docker containers are run, and looked at a demo of a autoservices project. The autoservices integrates with the Spring devtools lifecycle and provides a database (or other dockerized services you need, Kafka, MongoDB, ElasticSearch, etc) using Testcontainers if the app doesn't configure any.

You can look at the prototype implementation here: https://github.com/joshlong/testconta...
If you like the idea of auto-services and would like to see it brought to life, please thumbs up and comment on the GitHub issue: https://github.com/spring-projects/sp...

If you have any feedback or ideas about how to improve it, please reach out!

Contents:
0:00 - Introductions
2:17 - What is Josh working on?
5:58 - Is Java 17 worth it?
11:00 - How Josh tests microservices
13:09 - Building a JDBC example
18:40 - Adding the first test
25:30 - Adding Testcontainers with GenericContainer
30:53 - Using Testcontainers Cloud
33:33 - Setting up correct logging levels
36:30 - Using Testcontainers jdbc url support
40:50 - Looking at Autoservices prototype for local development
48:46 - Explaing how autoservices integrate into Spring devtools
53:44 - Trying autoservices demo in action
57:55 - Final words!


Watch video Testcontainers and Spring Boot for local development and integration testing online without registration, duration hours minute second in high quality. This video was added by user AtomicJar 01 January 1970, don't forget to share it with your friends and acquaintances, it has been viewed on our site 15,59 once and liked it 35 people.