Introduction to Testcontainers with JUnit 5 and Spring Boot

Поделиться
HTML-код
  • Опубликовано: 26 янв 2025

Комментарии • 34

  • @MIt-ql5bo
    @MIt-ql5bo 3 года назад +1

    great short intro. thanks!

  • @allanvictor6996
    @allanvictor6996 2 года назад

    The best video about TestContainers.

    • @rieckpil
      @rieckpil  2 года назад +1

      Thanks, Allan!

  • @andreaszientarski1754
    @andreaszientarski1754 4 года назад +7

    Best Tutorial I found, thanks!
    You should consider writing one up in a blog or something as I didnt find a solution as clean as yours, baeldung etc. does it differently

    • @rieckpil
      @rieckpil  4 года назад +1

      Thanks a lot Andreas!
      I have some similar Testcontainers and testing-related articles on my blog already: rieckpil.de/?s=testcontainers

  • @СергейВячеслаев
    @СергейВячеслаев 2 года назад +2

    Thanks, great explanation !

  • @danillolf
    @danillolf 3 года назад +2

    Absolutely the best, thanks for the tutorial

  • @Mohamed-uf5jh
    @Mohamed-uf5jh 2 года назад +1

    Thanks, great job!

  • @R2D2G7
    @R2D2G7 3 года назад

    Damn! Thanks a lot!Wish you were healthy! Such simple, short and fulfil of information video! Please, do them more!

    • @rieckpil
      @rieckpil  3 года назад

      thank you very much for your feedback :)

  • @Dan-mz5gt
    @Dan-mz5gt 2 года назад +1

    great tutorial

    • @rieckpil
      @rieckpil  2 года назад

      Thanks for the feedback. You're welcome 🥳

  • @dasariwinod
    @dasariwinod 3 года назад +2

    We created the PostgreSQl DB in a containter. But how the book table already exists in that database? i have not seen any configuration to create the table.

    • @rieckpil
      @rieckpil  3 года назад

      Hi Dasari,
      thanks for reaching out. It seems I forgot to mention that the Spring Boot application uses Flyway to migrate the database schema on application startup: github.com/rieckpil/blog-tutorials/tree/master/testcontainers-youtube-series/src/main/resources/db/migration

  •  4 года назад +2

    Thanks! I did finally despite the others with yours

    • @rieckpil
      @rieckpil  4 года назад

      glad to hear that you could successfully use Testcontainers

  • @varunmeta
    @varunmeta 2 года назад +1

    Thank you much for the tutorial, it was really helpful.
    On a side note, could you share which font you are using for Intellij code? Thanks again,

    • @rieckpil
      @rieckpil  2 года назад +2

      Thanks :) That's JetBrains Mono

  • @praveens2272
    @praveens2272 Год назад

    Does it take a lot of time to spin up the postgres docker container in application and memory

    • @rieckpil
      @rieckpil  Год назад +1

      If you have a decent laptop/PC, not really.

  • @AdrianVrabie
    @AdrianVrabie 4 года назад +1

    All good and well, but how did the schema get created in the test container? Didn't it just pull a new container with a random port? How did the schema get created there?

    • @rieckpil
      @rieckpil  4 года назад +2

      To create the actual tables I'm using Flyway and execute SQL migration scripts during application startup. If you want to e.g. create additional databases or database schemas (instead of using the default public), you can e.g. use Testcontainers .execInContainer() during @BeforeAll or use a custom Docker image where you tweak your database config.

  • @petroniobonavides3530
    @petroniobonavides3530 4 года назад +1

    Thanks, awesome!!!!!!

  • @petroniobonavides3530
    @petroniobonavides3530 4 года назад +3

    Could you please do this tutorial with MongoDB. Nobody did that in RUclips yet. Thx

    • @rieckpil
      @rieckpil  4 года назад

      A MongoDB video with Testcontainers might come in the future. I've already covered it with a blog post that explains the setup for a Spring Boot application: rieckpil.de/mongodb-testcontainers-setup-for-datamongotest/

  • @hendisantika
    @hendisantika 2 года назад

    How do we mix testcontainers, mysql & flyway?

    • @rieckpil
      @rieckpil  2 года назад

      Hi Hendi, please see my answer on your GitHub Issue github.com/rieckpil/blog-tutorials/issues/113

  • @premierde
    @premierde 4 года назад

    Do you need upfront a running docker.

    • @rieckpil
      @rieckpil  4 года назад

      You only need a running Docker Engine, Testcontainers will start and stop the containers for you.

  • @iorrancastro
    @iorrancastro 3 года назад

    How to run it in jenkins pipeline?

    • @rieckpil
      @rieckpil  3 года назад +1

      You need to expose the Docker socket (in case your Jenkins agent runs also runs as a Docker container) or install the Docker engine on your build agent. You can find further help here: www.testcontainers.org/supported_docker_environment/continuous_integration/dind_patterns/

  • @learnmycourse
    @learnmycourse Год назад

    nice

  • @buegeleisen8572
    @buegeleisen8572 4 года назад

    Ehre

  • @baibula
    @baibula Год назад

    Don't forget to change your timezone from 'Europe/Kyiv' to something else, such as Helsinki. It doesn't know anything about Kyiv.