Software Testing Tutorial - Learn Unit Testing and Integration Testing

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ธ.ค. 2024

ความคิดเห็น • 397

  • @calkelpdiver
    @calkelpdiver 3 ปีที่แล้ว +49

    Impressive! I'm a Tester who is working with Developers to improve their Unit Testing and code quality. I've been tasked to put together some training materials and I'm going to include this. The video hits on so many things, but makes them very clear and concise in definition and explanation. You show both the power & advantages of the tool(s) you use and for Unit Testing itself. So glad I found this.

  • @poojaandpawan6282
    @poojaandpawan6282 3 ปีที่แล้ว +37

    I wish I had found this earlier !! I spent quite a lot of time figuring out different tutorials for JUnit 5 and I ended up not writing JUnits for my Repository interfaces but going through this video has made me realize the simplest of ways to test Repositories by setting up H2 in memory database. Perfectly narrated and at a good pace. Keep up the good work !!

    • @fandusmercius723
      @fandusmercius723 10 หลายเดือนก่อน

      cant you use rollbacks etc?

  • @amigoscode
    @amigoscode  3 ปีที่แล้ว +8

    Download Diffblue to auto generate unit and integration tests
    www.diffblue.com/community-edition/download/promo?code=amigoscode
    Best selling courses
    ► Spring Full Stack and React Course WITH 30% OFF - amigoscode.com/p/full-stack-spring-boot-react/?product_id=2963573&coupon_code=FULLSTACK30
    ► Software Testing Course - amigoscode.com/p/software-testing
    ► Repo to follow along: github.com/amigoscode/spring-boot-fullstack-professional/

  • @환이-f6w
    @환이-f6w 3 ปีที่แล้ว +3

    I am a college student studying in Korea. All of your lectures are very, very good.

  • @centurion3708
    @centurion3708 3 ปีที่แล้ว +22

    I was just looking for this topic and this appears on my recomendations, how convinient

    • @destro5990
      @destro5990 3 ปีที่แล้ว

      It's the third time it happened to me this week

  • @hinerron
    @hinerron 3 ปีที่แล้ว +19

    Love it. You're a great teacher. I'm a Java boot camp student and I really appreciate seeing how a professional dev does it vs how I'm taught. Learning so many great tricks thanks to you!

  • @ChetanJain1507
    @ChetanJain1507 3 ปีที่แล้ว +9

    Yes please need a kafka tutorial as well, because now a days kafka is in demand. thanks in advance and for every tutorial, they are really helpful.

  • @bastisprogrammingcorner
    @bastisprogrammingcorner 2 ปีที่แล้ว +8

    Thank you! The topic of testing is often neglected when teaching programming. It makes sense to learn this very early and get into the habit of writing tests for your code. As you said, there is no way around this in professional software development.

  • @aimka77
    @aimka77 2 ปีที่แล้ว +7

    This tutorial is neat, as usual.
    Just a humble remark : @29:00, i think the variable expected should be named "result" (or "actual") to be coherent with what you nicely explained regarding BDD, since it's in the when part of the given-when-then methodology.
    Else, the assert is a little bit confusing: assertThat(expected).isTrue();
    Should be: assertThat(result).isTrue();
    Thanks a lot for everything you bring to the community.

  • @candimahendra9457
    @candimahendra9457 3 ปีที่แล้ว +2

    Wa alaikum salam wr. wb. I never doing any test before. And now in my new company, I have to doing test. Very helpful. Thank you for sharing.

  • @hananurrehman
    @hananurrehman 10 หลายเดือนก่อน

    Perhaps one of the few videos that actually show an integration test rather than the usual theoretical approach.
    Masha Allah keep it up.

  • @marco.garofalo
    @marco.garofalo 3 ปีที่แล้ว +5

    FYI the contextLoads test is not pointless at all, it verifies that the application is bootstrapped correctly and there is no exception raised by the application context. If you have missing configuration properties or some (auto)wiring issues that test would have caught it.

  • @centurion3708
    @centurion3708 3 ปีที่แล้ว +2

    These video finally made me understand what the hell what all this testing thing all about, loved it

  • @rahff99
    @rahff99 2 ปีที่แล้ว +1

    Thank you, I'm new in Java ecosystem so your courses are very valuable.
    جزاك الله خيرا

  • @fsantosinfo
    @fsantosinfo 3 ปีที่แล้ว +2

    This was the second video course I wacthed from this channel.
    Thank you so much for the video quality and the explanations.
    Really good!

  • @jarveyd8660
    @jarveyd8660 2 ปีที่แล้ว +1

    OMG i am so glad I found you. You have such an amazing way of explaining things. You are truly a natural at this. Your voice and teaching style is so soothing, I feel like it's my close friend explaining this complicated stuff to me. You are amazing, God bless! I can't thank you enough!

  • @tugbanur07
    @tugbanur07 3 ปีที่แล้ว +5

    You have excellent teaching skills, thanks for your effort.

  • @agnosticmanquestionsall2409
    @agnosticmanquestionsall2409 2 ปีที่แล้ว +1

    This is amazing, the most professional level video I've ever seen on TH-cam. Liked and Subscribed.

  • @alexakias97
    @alexakias97 3 ปีที่แล้ว +4

    Great tutorial overall. One suggestion. Plz consider zooming out a bit. Thanks!

  • @federicoladereche8727
    @federicoladereche8727 3 ปีที่แล้ว +20

    Excellent tutorial!
    Your technical and educational skills 👨‍🎓 match your kindness and goodness.
    Keep it up! 💪
    Saludos desde Uruguay mi amigo 💙🤍

    • @engnaderabdelkader5291
      @engnaderabdelkader5291 3 ปีที่แล้ว

      A Symfony 4 development environment with Docker and Docker-compose
      th-cam.com/video/2t_R-F2Z7xs/w-d-xo.html

  • @cefalea666
    @cefalea666 3 ปีที่แล้ว

    For me, one of the best teachers all around.. greetings from Spain Amigo!!

  • @gabrielfono844
    @gabrielfono844 2 ปีที่แล้ว

    thanks so much sir
    I have been working as backend engineer for 5 months
    I was given a task to write unit test and integration test.
    this give me great star.
    I am going ahead and enroll on your course for integration testing.
    thanks so much.

  • @joshualipian1187
    @joshualipian1187 4 หลายเดือนก่อน

    Oh God, your explanation is so good and simple. I was able to understand what happen behind the scene of the testing and especially in the debug part. This is my first time learning the JUnit testing, thankfully you are the first that pop up in the search engine :D.
    Thank you for your teaching sir, sadly I cannot afford your course in software testing, I wish I had money to afford for :). But the good thing I was able to learn in this video. Please don't stop creating a video like this, thank you 🙇‍♂

  • @rmdaw00
    @rmdaw00 3 ปีที่แล้ว +1

    Great Tutorial Thank you, I am learning from your course after watching other JUnit tutorial , thank you for showing a proper real world example. feeling more confident now, Looking forward to explore videos from your channel
    Just for others that are following here are things I had to do:
    - got error complaining about lambok not getting access to a class, update the version, I updated Spring boot to latest version in the pom.xml file
    - spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1
    this is the url path that worked for me

  • @j-don6668
    @j-don6668 3 ปีที่แล้ว +160

    Can you do a kafka tutorial? There's not many good ones out there

    • @MintyKanesh
      @MintyKanesh 3 ปีที่แล้ว +8

      Yeah I've found spring kafka very confusing!

    • @duparcg
      @duparcg 3 ปีที่แล้ว +3

      Especially spring batch

    • @skumakerguitar8708
      @skumakerguitar8708 3 ปีที่แล้ว

      yes please! agree

    • @DerAltruist
      @DerAltruist 3 ปีที่แล้ว +5

      @@MintyKanesh Yeah, you ever read "the castle" by kafka? Makes no sense!

    • @muthuicris2030
      @muthuicris2030 3 ปีที่แล้ว +2

      kindly do one for spring kafka

  • @averagedev7768
    @averagedev7768 ปีที่แล้ว

    This is basically an entire university subject practice in one video. Awesome job

  • @temrimoose
    @temrimoose 3 ปีที่แล้ว +2

    Good evening dear friend I am a Moroccan developer in java spribg boot and I love your tutorials. I have a request please if you can make a video on spring kafka and thank you in advance

  • @pawel80
    @pawel80 ปีที่แล้ว

    I had a lot of questions while watching this video, but you always answered on my questions a few minutes later, you are awesome dude.

  • @jmf5655
    @jmf5655 3 ปีที่แล้ว +4

    Love your courses!
    Greetings from Argentina

  • @mr.personman7426
    @mr.personman7426 2 ปีที่แล้ว +3

    When testing the if student email exists, you could use a getter for the email defined in the student model class. Great video!

  • @rogerkaufmann1761
    @rogerkaufmann1761 2 ปีที่แล้ว

    You are the best teacher for programming by far.

  • @rabiyounes8928
    @rabiyounes8928 2 ปีที่แล้ว

    Best unit & integration tests tutorial so far, thanks mate

  • @indahyusuf5391
    @indahyusuf5391 ปีที่แล้ว +1

    Hello Nelson
    Thank you so much for your professionnalisme, infact I so much enjoyed going through this testing and mocking. I am thinking of going through it once more to grasp the essentials,frankly speaking you are excellent in the ways you make things look simpler
    indah

  • @dreb.7760
    @dreb.7760 2 ปีที่แล้ว +1

    That was a great example at the end, thank you!

  • @kalebtf
    @kalebtf 2 ปีที่แล้ว +2

    Thanks a lot , among all the massive trainings out there, I have been studying yours since the past months, well and clearly explained and updated!

  • @GregDonald
    @GregDonald 3 ปีที่แล้ว +2

    What happened to the integration tests at 1:14? Where's anything about basic @Entity testing? Are there other videos where these things are covered?

  • @rakanasfour448
    @rakanasfour448 ปีที่แล้ว

    Thank you so much. I watched the entire tutorial all the way to the end

  • @maximlejaeghere1730
    @maximlejaeghere1730 3 ปีที่แล้ว

    This is gold. Finally someone that explains testing to me in an understandable way. Thank you so much.

  • @kimiOfDieLinke
    @kimiOfDieLinke ปีที่แล้ว

    Very good and great that you motivate programmers to write tests :) There is so much stuff you _will_ miss if you don't write a Test.

  • @gradientO
    @gradientO 3 ปีที่แล้ว +4

    wa alaikum as salam!! Thank you for this huge tutorial. I'm still new to backend. Gotta learn more

  • @alexandre9051
    @alexandre9051 3 ปีที่แล้ว +1

    You really know how to get the message across! Thank you very much for this video!

  • @макскупр-ш4у
    @макскупр-ш4у 2 ปีที่แล้ว

    why i does not found this last month? Its amazing! Hey, you have a talant to explain things by simple language!

  • @devguyahnaf
    @devguyahnaf 2 ปีที่แล้ว +1

    I'm a simple man. I see Nelson thumbsup, I click on video

  • @karlodimjasevic527
    @karlodimjasevic527 ปีที่แล้ว

    Awesome! You've covered everything that I was looking for! Keep this up!

  • @uppsaladde
    @uppsaladde 3 ปีที่แล้ว +4

    Thanks for a good tutorial, this was exactly what I needed. Keep it up! :)

  • @gabrielsales311
    @gabrielsales311 3 ปีที่แล้ว +1

    Thank you Nelson! You're the best teacher

  • @vovaslipchik6834
    @vovaslipchik6834 3 ปีที่แล้ว +5

    h2 in-memory database for tests can leak some features that you use in application db (postgres or mysql) so it's handy to use test containers, looking forward to testcontainers tutorial :)

    • @GSBroker
      @GSBroker 3 ปีที่แล้ว

      Hey, may I ask you what you mean by leak? Can you elaborate please?

    • @vovaslipchik6834
      @vovaslipchik6834 3 ปีที่แล้ว +3

      @@GSBroker i meant - miss some features that are applicable for some databases only

  • @longnguyenvan9532
    @longnguyenvan9532 3 ปีที่แล้ว +2

    Hey man, your vidieos are really amazing that I have to admit :)) If you have time, please compose socket videos. You have a good explaining so I think you can give the best anwser how the socket works. Thank you and have a good day!

  • @pasvupaspris303
    @pasvupaspris303 8 หลายเดือนก่อน

    you can also create an ArgumentCaptor with the @Captor annotation

  • @munawarabbas1636
    @munawarabbas1636 3 ปีที่แล้ว +6

    i just say may allah bless you more and more

  • @quicksilver969
    @quicksilver969 3 ปีที่แล้ว +2

    At 54:00 the test is not efficient enough. I hope it was done for the sake of simplifying the usage of Mockito otherwise poor test. Instead of verifying that the correct repository method was called, you should mock the method response to return something and then assert that the service method returns the same thing that you mocked. For example if you call the repository method in service method but also return empty list of Students then the test would also pass.

  • @maksatrysbekov194
    @maksatrysbekov194 3 ปีที่แล้ว +11

    Do have experience with message brokers like kafka or rabbitmq? I would appreciate sharing video about these technologies too

  • @user-segadev
    @user-segadev 3 ปีที่แล้ว +3

    ты молодец! желаю миллион подписчиков твоему каналу )

  • @Yaruk
    @Yaruk 3 ปีที่แล้ว

    Thanks for this Tutorial, I have an interview tomorrow for Junit Test

  • @qwertyguy7750
    @qwertyguy7750 2 ปีที่แล้ว +1

    Again right to the point, easily understandable and great content as always 👏🏽

  • @oberon1995
    @oberon1995 2 ปีที่แล้ว

    Great course, thanks!
    Before watching the video, I got a little familiar with the theory of integration testing and this made it easier to understand the topic. Took a little effort to write a test to check for the possibility of deletion, it was great!
    I will watch your content in the future
    peace!

    • @NickRuster
      @NickRuster 2 ปีที่แล้ว

      А почему future peace? Это же кусок не?

  • @peepoHappyy
    @peepoHappyy 3 ปีที่แล้ว +5

    I was wondering if you can create a crash course on Web Development, amazing content as always :D

  • @bimsaragunarathna2900
    @bimsaragunarathna2900 3 ปีที่แล้ว

    ThanX Bro. You're a great teacher. Literally saved me here

  • @ArnavKircha
    @ArnavKircha หลายเดือนก่อน

    Great video for understanding unit testing and mocking

  • @abessesmahi4888
    @abessesmahi4888 3 ปีที่แล้ว

    و عليكم السلام و رحمة الله و بركاته، بارك الله فيك أخونا.
    Thank you so much brother.

  • @zainwasem
    @zainwasem 2 ปีที่แล้ว

    A man with zero haters

  • @sormariano
    @sormariano 2 ปีที่แล้ว

    Thank you for you very useful videos and above all for your very very clear English language: this is a great added value for us followers not having English as mother tongue.

  • @Devivl
    @Devivl 9 หลายเดือนก่อน

    Thank you! You are a good teacher!

  • @cuongnguyenhung9977
    @cuongnguyenhung9977 2 ปีที่แล้ว

    Hey bro. Thank you so much. I love your courses, it is useful and clear.

  • @abdelrahmanmetwally7674
    @abdelrahmanmetwally7674 2 ปีที่แล้ว

    Wa 3alikum el salam brother happy to find a Muslim brother in this field that alone puts a lot of inspiration

  • @derrickagyemang1259
    @derrickagyemang1259 2 ปีที่แล้ว

    Great tutorial Nelson, really love your content

  • @shyamgurunath5876
    @shyamgurunath5876 3 ปีที่แล้ว

    Recently saw your channel...Loving your videos...Keep posting....Anything related to data science will be helpful...

  • @youssefelmoro1464
    @youssefelmoro1464 2 ปีที่แล้ว +5

    In the Argument Captor chapter, you forget to mock the call to the selectExistsEmail method to return false. (but it worked fine because the default value of boolean primitiv is false, right ?)

  • @dubaifatimaali
    @dubaifatimaali 3 ปีที่แล้ว +4

    Great looking forward to it

  • @madhvinaik1828
    @madhvinaik1828 ปีที่แล้ว

    @amigoscode how were you able to pass student repository instance? Line number 14, @ 45:29

  • @kediryibrie1008
    @kediryibrie1008 3 ปีที่แล้ว +2

    Wealykum aselam, thank you bro . It is helpful

  • @rocavill
    @rocavill 11 หลายเดือนก่อน

    This is a great video! Very well explained!

  • @bhoomikadetroja5584
    @bhoomikadetroja5584 3 ปีที่แล้ว +1

    Such an amazing tutorial

  • @devashishroychowdhury3080
    @devashishroychowdhury3080 2 ปีที่แล้ว

    It also helped me to understand the software engineering topics..

  • @dragulaxis
    @dragulaxis 3 ปีที่แล้ว +2

    Thank you very much for your lesson!
    What the program you use for schemes and plane your application (example 22:18)?

    • @17TheVIP
      @17TheVIP 2 ปีที่แล้ว +1

      its draw io

    • @dragulaxis
      @dragulaxis 2 ปีที่แล้ว

      @@17TheVIP thank you!

  • @Hivstein
    @Hivstein ปีที่แล้ว

    Salam Alikum, what to say, amazing are your courses, barak Obama fik; sorry Barak Allah fik :).

  • @fufufifi2349
    @fufufifi2349 11 หลายเดือนก่อน

    Thanks, barakaAllahu fik

  • @kostiantynkarzhanov9216
    @kostiantynkarzhanov9216 8 หลายเดือนก่อน

    Thank you! Great tutorial! 💛

  • @justalilbit8887
    @justalilbit8887 3 ปีที่แล้ว +1

    46:00 nice point there.

  • @barnardmutezo8276
    @barnardmutezo8276 3 ปีที่แล้ว +3

    Finally! Thanks bro.

  • @yevheniikiprenko3639
    @yevheniikiprenko3639 3 ปีที่แล้ว

    Thanks for the video! I'm really like the way you teach.

  • @carlitos4505
    @carlitos4505 3 ปีที่แล้ว

    Thanks for this!! You’ve earned a new subscriber!

  • @apall2764
    @apall2764 3 ปีที่แล้ว

    You're a great teacher great job!

  • @jthomas9751
    @jthomas9751 3 ปีที่แล้ว +1

    Hey nelson please can you do an html and css tutorial. I find you much much understandable than the ones out there

  • @aioaneiadrian9232
    @aioaneiadrian9232 2 ปีที่แล้ว

    At 3:56 I think that the name of the integration class should be StudentController. You have already a class named StudentRepository

  • @helovesdata8483
    @helovesdata8483 3 ปีที่แล้ว +25

    My goal is to learn half of what you know 🤦🏾‍♂️😂

    • @engnaderabdelkader5291
      @engnaderabdelkader5291 3 ปีที่แล้ว

      A Symfony 4 development environment with Docker and Docker-compose
      th-cam.com/video/2t_R-F2Z7xs/w-d-xo.html

  • @haithemothmane4558
    @haithemothmane4558 3 ปีที่แล้ว +1

    Thanks a lot, that was really nice, perfect and well explained

  • @ibrahimqandeel5326
    @ibrahimqandeel5326 3 ปีที่แล้ว

    Amazing crash course. Thank you very much.

  • @carloscazelattojr
    @carloscazelattojr ปีที่แล้ว

    at 29:28 , when i run, in the repository line, in mine, it is showing nullPointer in underTest. I didn't understand why. Do you have any guidance?

  • @crowbenny
    @crowbenny ปีที่แล้ว +3

    Test run on minute 37:20 failed (for me). I changed "spring.jpa.properties.hibernate.dialect" from "org.hibernate.dialect.PostgreSQLDialect" to "org.hibernate.dialect.H2Dialect" and then it works

    • @abdullahkassem7417
      @abdullahkassem7417 ปีที่แล้ว

      Thank you i was having the same issue and this resolved it

  • @humanminus84
    @humanminus84 3 ปีที่แล้ว +1

    Jazakallah Khair brother , Happy Ramadan

  • @iLlamas1
    @iLlamas1 3 ปีที่แล้ว

    this looks really good, I will buy the course next month

  • @berihunhadis3960
    @berihunhadis3960 ปีที่แล้ว

    Thanks a lot you are always supportive

  • @sandeepkolluri8811
    @sandeepkolluri8811 3 ปีที่แล้ว

    32:20 while I am creating application properties it did not show directories. How can I create application properties in Spring Tool Suite

  • @ChandlerBing11
    @ChandlerBing11 2 ปีที่แล้ว +1

    Amazing tutorial, Mama Samba!!! You could bring some content about QueryDSL, because it's type-safe and few channels approach this. Thank you so much

  • @AndreyDelay
    @AndreyDelay 2 ปีที่แล้ว

    Amazing lesson! Thanks for the efforts!

  • @kamalzubairov2344
    @kamalzubairov2344 2 ปีที่แล้ว

    Thank you very much. Very clear explanation

  • @a.y5742
    @a.y5742 2 ปีที่แล้ว

    23:45
    You can also just press Alt+Enter for more options

  • @MiguelLutz-vi6zc
    @MiguelLutz-vi6zc ปีที่แล้ว +2

    I'm not sure if I'm the only one struggling with some of your tutorials but a lot of times I can't setup the projects like you do. For the DemoApplcationTest right in the beginning of this tutorial I am getting an "Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method" error. I have only cloned your project and tried to run the test...

  • @kapilnayak4030
    @kapilnayak4030 3 ปีที่แล้ว

    I must say god bless you. may god give you good health. you are awesome bro......