TestContainer From Zero to One. TestContainer Spring Boot, MySQL and RabbitMQ example.

preview_player
Показать описание
TestContainer Spring Boot, MySQL, RabbitMQ, Maven, and Gradle example.
REST API integration testing end to end.

TestContainer + Spring Boot + MySQL DB+ RAbbitMQ

Why TestContainer? 00:00:20
How to do integration testing for container apps?
TestContainer using docker API

-Introduction
Prerequisites
-Docker
-JDK
-maven or Gradle build tool
-Support JVM-based test frameworks such as Junit 4/5, Spock, etc.
- Features 00:06:05
- Create Spring Boot Project 00:08:44
- Setup container in local for MySQL DB and RabbitMQ 00:14:18
- Sample Example with spring boot with Junit 00:23:00
- Play with Testcontainer 00:29:20
- TestContainer Best Practices 01:12:10
- Use the singleton pattern, use the static block
- Speed up start time with multiple containers
- Reuse the container
- Run test in docker container (Docker in Docker)

Configuration Property to update to reuse the container 00:53:10

Create Generic Container using Testcontainer 01:02:00
Spring set properties dynamically 01:06:40
Get Data or Properties from Container using TestContainer 01:07:23

Create a container on the fly using DockerFile 01:15:18

In situations where there is no pre-existing Docker image, Testcontainers can create a new temporary image on the fly from a Dockerfile

1. with Docker File, you can create Container
2. Without Having a docker file, on the fly create a container.
If you don't have static Dockerfile then use the below code

GithubSource Code:-

Docker Course For the beginner:

For more such Tutorials

Medium Publication
Рекомендации по теме
Комментарии
Автор

Hi Maheshwar, thank you for putting this video together, it looks like a very good overview, but unfortunately, the sound is very poor. Very hard to hear and understand the topic because it's breaking up all the time. Do you have it anywhere in a better quality?

Notmyrealname
Автор

How we can mix MySQL Test Container with Flyway? Because I tries it always got error. Thanks

hendisantika
visit shbcf.ru