Это видео недоступно.
Сожалеем об этом.

Spring Boot 3 Integration Testing With TestContainers | Junit 5 | JavaTechie

Поделиться
HTML-код
  • Опубликовано: 24 авг 2023
  • #JavaTechie #SpringBoot #IntegrationTest #Testcontainers
    In this tutorial, we will discuss how to do Spring Boot application Integration Testing using Testcontainers , same as production environment
    👉 Simple Integration Test using MySQL DB
    👉 Problem with above approch
    👉 Solution:
    Step by Step guides to perform Integration Test using Testcontainers
    Spring boot microservice Premium course lunched with 70% off 🚀 🚀
    Hurry-up & Register today itself!
    COURSE LINK : javatechie5246.ongraphy.com/
    PROMO CODE : JAVATECHIE50
    OR use Javatechie APP
    Download the JavaTechie app on your iOS or Android device from the App Store or Google Play Store.
    Find the links below :
    Android 🌐 : play.google.com/store/apps/de...
    IOS 🌐 : apps.apple.com/in/app/javatec...
    GitHub:
    github.com/Java-Techie-jt/java8
    Blogs:
    github.com/Java-Techie-jt/spr...
    Facebook:
    / javatechie
    Join this channel to get access to perks:
    ruclips.net/user/javatechiejoin
    Techies if you like this video please do subscribe now and press the bell icon to not miss any update from Java Techie
    Disclaimer/Policy:
    --------------------------------
    Note : All uploaded content in this channel is mine and its not copied from any community ,
    you are free to use source code from above mentioned GitHub account

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

  • @vishnu15mpl
    @vishnu15mpl 9 месяцев назад +7

    “Manager will dance on top of your head” - quite funny. But on a serious note, thank you for all your work on this.

  • @sayanbiswas8847
    @sayanbiswas8847 11 месяцев назад +8

    Solved a critical user story today in my company watching your videos on spring batch processing. Thanks a lot for your hard work :)

    • @Javatechie
      @Javatechie  11 месяцев назад +1

      Glad to hear this 😊. Keep learning 👍

  • @senya-man9710
    @senya-man9710 11 месяцев назад +12

    This channel is making me a better java developer everyday, kudos to you Sir.

    • @Javatechie
      @Javatechie  11 месяцев назад

      Thanks buddy 😊. Keep learning

  • @rajeevsai91
    @rajeevsai91 5 месяцев назад +1

    I started reading the documentation, but was a little confused. So, I just opened youtube searched for 'testcontainers javatechie', learnt about the concept in an easier way. Now I can start coding. Thank you very much for all the great effort you are putting in bro! You are helping a whole community.

    • @Javatechie
      @Javatechie  5 месяцев назад

      Thank you so much buddy . Keep learning

  • @rajivn3707
    @rajivn3707 11 месяцев назад +3

    God bless you for making these videos you made me better at what I really wanted to do!!

  • @gopisambasivarao5282
    @gopisambasivarao5282 11 месяцев назад +3

    Appreciate your efforts, Basant. God bless you. 🙂

  • @nikhilballari5484
    @nikhilballari5484 5 месяцев назад +1

    This is a very commendable effort !! You are an inspiration to java developers like me, Sir. Kudos to you !!

  • @alirezaasadi8656
    @alirezaasadi8656 4 месяца назад +1

    Thanks for the good content man. appreciate it

  • @TheMakeupmonika
    @TheMakeupmonika 11 месяцев назад +1

    thank you so so much Sir !

  • @rohitmanohar2733
    @rohitmanohar2733 11 месяцев назад +2

    Sir this video is circulating in my company as official reference for updating test traditional test case.

  • @Anilkumar-reddy
    @Anilkumar-reddy 11 месяцев назад +1

    Very Helpful bro😍😍

  • @2RAJ21
    @2RAJ21 13 дней назад

    Thank you

  • @deepakgowda7292
    @deepakgowda7292 11 месяцев назад +1

    Super sir ❤

  • @hernanbiondini
    @hernanbiondini 9 месяцев назад +1

    From which SpringBoot version can I use the "test containers"? Very good channel, greetings from Argentina!

  • @ainigma100
    @ainigma100 5 месяцев назад

    Thank you for the great video!
    Can you please make a tutorial on testing a spring boot 3 application that has security enabled (Keycloak). Assuming that we do not want to disable the security while running unit tests (being able to test the controller) and integration tests (using keycloak testcontainer). The application can have @EnableMethodSecurity and we also use @PreAuthorize("hasRole('user')") above the controller methods to have more granular control. What is the proper way to test a secured Spring Boot 3 application? Maybe during the actual tests we should generate an actual token and then try to test the endpoints.
    Thank you in advance!

  • @allchannel5985
    @allchannel5985 9 месяцев назад

    Hi good job. Please we can use directly H2 database?

  • @__nitinkumar__
    @__nitinkumar__ Месяц назад

    Is it possible to mock atleast the 3rd party API calls.
    Let's say my service calls an external HTTP API, can I mock that, because that may not be up, and may be I don't want to pass the real credentials

  • @abulsyed4851
    @abulsyed4851 11 месяцев назад

    Great vid. Could you also make a video on functional testing with cucumber? Not many videos on this out there.

    • @Javatechie
      @Javatechie  11 месяцев назад

      Here it is buddy i already did it a few yr back ruclips.net/video/8AEQt4CSX5U/видео.html

  • @mukeshmandal3984
    @mukeshmandal3984 11 месяцев назад +1

    Excellent work!. I am curious to know, how to check the inserted data in test containers.

    • @Javatechie
      @Javatechie  11 месяцев назад +1

      Yes you can just inject @CourseRepository and call findAll() method and log it

  • @user-tr3zd3ui2e
    @user-tr3zd3ui2e 11 месяцев назад +1

    Thanks, it really helped.
    One query : Can we see the test data in test sql db?
    ❤❤

    • @Javatechie
      @Javatechie  11 месяцев назад

      Yes you can just inject @CourseRepository and call findAll() method and log it

  • @hariprasad2697
    @hariprasad2697 5 месяцев назад +1

    So, this kind of testing is possible only if we're using docker in projects, incase if we're not using docker tools or any other tools in our projects, then ultimately we have to do regular integration testing only right

  • @arvindimage
    @arvindimage 11 месяцев назад

    Its awesome ...thanks much.
    When we are running tests locally...we can start docker..not an issue but when we are running in cicd..how can i setup and start docker before running tests there??

    • @abulsyed4851
      @abulsyed4851 11 месяцев назад +1

      I has the same question in mind. But when I pushed to github. My CICD github actions was able to run the integration just like in local. The test containers config itself will setup the database in the pipeline.

    • @arvindimage
      @arvindimage 11 месяцев назад +1

      @@abulsyed4851 thanks. You mean there is no need of docker setup?? Can u plz share the code file and project of possible...will be really helpful

    • @abulsyed4851
      @abulsyed4851 11 месяцев назад +1

      @@arvindimage yeah that's correct. I didn't have to setup anything in my GitHub actions, other than java.

  • @franckozeusmakita7022
    @franckozeusmakita7022 11 месяцев назад +1

    Thanks for this nice Integration Testing. please can you explain me what is this method doing: private String asJsonString(Object object) {
    try {
    return new ObjectMapper().writeValueAsString(object);
    } catch (JsonProcessingException e) {
    e.printStackTrace();
    }
    return null;
    }
    I am new in Integration Testing. Thks

  • @poorpanda9033
    @poorpanda9033 8 месяцев назад +1

    Thank you so much. Do you have a linkedin I would like to tag you

    • @Javatechie
      @Javatechie  8 месяцев назад

      I haven't created a LinkedIn profile for my channel but yes You can find my LinkedIn with "Basant Hota"

  • @saiRakshya
    @saiRakshya 4 месяца назад +1

    Make one video about CORS configuration

  • @senya-man9710
    @senya-man9710 11 месяцев назад +1

    Is it necessary to explicitly stop the containers?

    • @Javatechie
      @Javatechie  11 месяцев назад +1

      No it's optional

  • @anshulbadwaik
    @anshulbadwaik 9 месяцев назад +1

    To run TestContainers, do we have to install Docker in our local machine ?

    • @Javatechie
      @Javatechie  9 месяцев назад

      Yes without docker how can we run the container

  • @haiderm1384
    @haiderm1384 5 месяцев назад

    Great tutorial. However this does not work in pipeline as we cannot run docker in docker on gitlab. How can we start testcontainer as a service in gitlab and then run the test there?

    • @Javatechie
      @Javatechie  5 месяцев назад

      What pipeline are you using

  • @0xb0110
    @0xb0110 7 месяцев назад +1

    You don't have to start and stop the container yourself, this is already done by the @Testcontainers annotation.

  • @CH6097-g2p
    @CH6097-g2p 8 месяцев назад +1

    we want testcontainers with webflux

    • @Javatechie
      @Javatechie  8 месяцев назад +2

      Okay will do that

    • @CH6097-g2p
      @CH6097-g2p 8 месяцев назад +2

      @@Javatechie Thank you very much. Appreciate if you can deliver the video fast. there are not much resources about that.