Test Driven Development (TDD) | Crash Course | 2020

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

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

  • @amigoscode
    @amigoscode  4 ปีที่แล้ว +17

    ► Clone repo here: github.com/amigoscode/software-testing
    ► Join Private Facebook Group - facebook.com/groups/45603...

    • @LaMarLP55
      @LaMarLP55 4 ปีที่แล้ว

      Question: I'm trying to learning TDD and I clone the Repo and in the right branch. However I'm using Visual Studio and when I try to run the test as you did I get this Error: Main method not found in the file, please define the main method as: public static void main(String[] args) any ideas

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

      @@LaMarLP55 i had the same problem, my problem was when i click at checkout at branch 6-origin-test it got those same error, solution was new branch from selected, hope it works

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

    Amigoscode you are one of the best teachers that I've ever learned from, not only that, you cover an absurd amount of topics. Thanks for always having my back!

  • @joaopedrodeamorim2634
    @joaopedrodeamorim2634 4 ปีที่แล้ว +10

    As usual, fantastic. Cheers from Brazil!

  • @1337ArMaAa
    @1337ArMaAa 2 วันที่ผ่านมา

    Amazing tutorial :D ! Keep up the good work man!

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

    I'm soooo happy that I found another treasure vlogger!!!

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

    Wow! I like this post. Very good, I learned a lot of things. I'll watch the other videos! You are a good teacher

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

    Excellent for something I'm not even paying for.

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

    36:34 This test code would fail if later the message was changed to something else (which is likely to happen). But it was not the original code needs to be fixed, but the test need to be fixed in this case. Maybe this is a problem with TDD, i.e., you may need to spend extra time refactoring your test code rather than the code to be tested.
    Also it seems to me that if you can take all possible conditions into account in your test code, you can actually ALREADY avoid bug in THESE scenarios. E.g. in the phone number validation example, you think of 2 conditions: phone number should start with +44 and it should have 12 digits and you put that in your test code. But if you're aware of these 2 conditions, you should already be able to put the check in your code to be tested. So in this sense the test code is redundant. On the other hand, if you don't take these 2 conditions into account, your code would still have bug although it can pass unit testing.
    It seems to me the test code would be more useful when later the original code to be tested is modified. So running the unit test can make sure the original functionality is not broken. But in reality it's not common to remove existing logic but more likely to add some new code over that. Take the phone number again for example, maybe later +441234567890Ext123 appears as a valid phone number. In this case the original code would be modified to add this possibility. But in this case the test code would fail because it also needs to be modified.

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

    Good explanations and also a good video. Didn't you skip some parts or continue too quickly?
    In my opppinion the cycle of testdriven development is allways to create failing test, fix with the minimal amount of code possible and create the next failing test. So when you created the function returning just false and checking for true the minimal approach would be to change the returned value and than add a test checking for false...

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

      I was looking for this comment, I think the same, in the first test he should make it return just true, and then create another test that force him to implement some part of the phone number validation logic

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

    Excellent video Nelson!

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

    You are really doing good job, thank you so much.......

  • @nayalashmohammad8490
    @nayalashmohammad8490 4 ปีที่แล้ว +8

    This is just what I needed! Could you also make a Golang OAuth API Tutorial (making a go API from scratch) Thanks.

    • @amigoscode
      @amigoscode  4 ปีที่แล้ว +7

      Great suggestion! I have been doing lots of Go lately so stay tuned

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

    جزاكم الله خيرا" . Jazaka ALLA khayran Bro

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

    Keep with the good work Bro!

  • @123cheke
    @123cheke 3 หลายเดือนก่อน

    Great video as most you publish. Just one comment, what is the scenario for the case where you have a new public function, but inside it you have various private functions defined or private variables that call functions from other classes? How do you implement the unit test of each one? Regards.

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

    Awesome work. Great Java tutorials! Keep it up.

  • @albinsjolin649
    @albinsjolin649 4 ปีที่แล้ว

    Dude, you are doing such good content! Gods work!

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

    I came back to this video after a year. Java is still not better looking but I now understand TDD better.
    This section of the course is not TDD. Sure, tests are being done before the actual coding but this does not mean TDD. TDD builds better code as it enables concentration on smaller segments of the code. Saying "I want to keep this video simple" is a total waste of time as there are many factors that need to be understood to do TDD.
    A side effect is that you can confidently release software just by having the tests pass. This means that you have to have confidence in the tests and doing this is hard.
    One of the great tragedies of our software age is that we spend more and more effort with rotting code bases, meaning the costs just spiral out of control. Done properly TDD will eliminate this.
    For a really good book on TDD get Clean Craftsmanship by Robert C Martin but be warned, you need to actually understand what is in the book to have any chance of proper TDD.

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

    why did you drop the TDD in the last part and wrote the service logic first and modified the tests to pass afterwards?

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

    thanks for this awesome chanel nelson .

    • @amigoscode
      @amigoscode  4 ปีที่แล้ว

      Glad you enjoy it!

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

    Great video.
    Possible video on Domain Driven Design?

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

      Great suggestion!

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

    Good Evening at the end of the video you placed an @Service bean but how come you did that since you did not have a service package. or maybe i am overlooking something.

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

    This is amazing, thank you.

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

    Another great course. Your crash course is like a pro level course. Thanks to Amigos.

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

      thanks Zakaria

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

    Great video as always Nelson! Been looking to do more TDD during my internship. Thank you!

  • @saimonldable
    @saimonldable 4 ปีที่แล้ว

    Very good example of mockito and TDD. Thank you so much!!

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

    Passes the Uncle Bob quality test.

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

    Hey Nelson nice work, well explained simple and straight. I want only to discuss the PhoneNumberValidator class, it's a utility class so for me it's not needed to declare it like a bean and put it in the constructor of various Service class. I think that it's better to make a utility class with static methods in it and use it like every other utility class, so no need to mock it in the test or pass it in the constructor, it's more flexible. Tell me what you think about this modification. Good work keep it up!

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

      Statics are evil and difficult to test when you reply on external dependencies

  • @Abhishek-tr4oi
    @Abhishek-tr4oi 4 ปีที่แล้ว +1

    First one here... I was waiting very eagerly.Thanks🙂

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

      Hope you enjoyed it!

    • @Abhishek-tr4oi
      @Abhishek-tr4oi 4 ปีที่แล้ว

      @@amigoscode yes loved it♥️

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

    Can someone explain me why the public keyword wasn't necessary at the PhoneNumberValidatorTest? Is due to the fact that no other module will use the class?

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

    What's the font configured in your zsh? It's very readable.

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

    Hi can you please update this, I tried to run the tests after branch 6 and I had no option to run them. I did clone the repo in to intellij

  • @navinmeshram7541
    @navinmeshram7541 4 ปีที่แล้ว

    Your system is running freaking hot... MacBook Pro with i9 it is.

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

    Nice! Waiting for a video on interview questions/process for junior developers. That'd be awesome.

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

    Hey! First of all, congratz on an amazing video! I'd like to ask one question: Don't you think that parameterized test ruin the clean code idea of having one test for each assertion?

  • @mouradnebhi8833
    @mouradnebhi8833 4 ปีที่แล้ว

    Thx A lot My Friend, Baraka Allah Fik

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

    Awesome video bro, best video I have seen so far about TDD.

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

    Awesome video, Thanks alot.

    • @amigoscode
      @amigoscode  4 ปีที่แล้ว

      Glad you liked it!

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

    Amazing clarity

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

    As much as I hate writing tests, I'm hoping that you will convince me to want to do it more :D

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

      I also hate write tests for react apps :p

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

    Mockito and JUNIT testing is it included in software testing please tel me waiting

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

    When building the project I get the follwoing error: java: package javax.persistence does not exist

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

    wow! this is good. please can you do a TDD on devices like bikes?

  • @nasuhemreatessoy870
    @nasuhemreatessoy870 4 ปีที่แล้ว

    You're awesome. Thanks for advice and courses

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

    Please the discord link has expired? Can I get the link again?

  • @TrendRain
    @TrendRain 4 ปีที่แล้ว

    can you share your work environment. What are those 2 monitors? Maybe Amazon link?

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

    Where can I get the full course

  • @44erso
    @44erso 3 ปีที่แล้ว

    i have a generell question regarding "how to start a test". why does maven tests fails but intellijs not ? is it all about wrong configuration ?

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

    Hi Sir! You are doing a great job. I request you to make a video on Microservices and How to secure Microservices. Thank you so much for the knowledge that you are sharing with us. Assalamualaikum!!!

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

    awesome work,thanks

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

    Awsome video. I enjoy the way you explain things... Thanks for that. Can you do a video like this but in python for web development? Have a great day

  • @salih.k8939
    @salih.k8939 3 ปีที่แล้ว

    Nice video as always

  • @johncerpa3782
    @johncerpa3782 4 ปีที่แล้ว

    this is the actual good video

  • @josephwong2832
    @josephwong2832 4 ปีที่แล้ว

    Thanks a lot nelson!!!

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

    Playback speed 1.5x makes it much better.

  • @silverfang312
    @silverfang312 4 ปีที่แล้ว

    Great video!

  • @detaaditya6237
    @detaaditya6237 4 ปีที่แล้ว

    That's a fantastic crash course sir! I have a question. When you add PhoneNumberValidator into CustomerRegistrationService, shouldn't we rewrite the test first, make it fail, and then start writing the logic in CustomerRegistrationService?
    Thanks in advance

  • @paulntalo1425
    @paulntalo1425 4 ปีที่แล้ว

    Am getting this errors on building the project after checking out branch 6- integration testing in IntelliJ. What do I do??

    • @amigoscode
      @amigoscode  4 ปีที่แล้ว

      What error?

    • @amigoscode
      @amigoscode  4 ปีที่แล้ว

      What error?

    • @paulntalo1425
      @paulntalo1425 4 ปีที่แล้ว

      @@amigoscode Information:java: Errors occurred while compiling module 'testing'
      Information:javac 11.0.4 was used to compile java sources
      Information:02/06/2020 09:51 - Build completed with 4 errors and 0 warnings in 47 s 613 ms
      C:\software-testing\src\main\java\com\amigoscode\testing\customer\CustomerRegistrationService.java
      Error:(12, 19) java: cannot find symbol
      symbol: class CustomerRepository
      location: class com.amigoscode.testing.customer.CustomerRegistrationService
      Error:(15, 40) java: cannot find symbol
      symbol: class CustomerRepository
      location: class com.amigoscode.testing.customer.CustomerRegistrationService
      Error:(19, 37) java: cannot find symbol
      symbol: class CustomerRegistrationRequest
      location: class com.amigoscode.testing.customer.CustomerRegistrationService
      C:\software-testing\src\main\java\com\amigoscode\testing\customer\CustomerRegistrationController.java
      Error:(22, 26) java: cannot find symbol
      symbol: class CustomerRegistrationRequest
      location: class com.amigoscode.testing.customer.CustomerRegistrationController

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

      @@amigoscode same!!!

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

    I can't find the full course for TDD.

  • @tinoutech5016
    @tinoutech5016 4 ปีที่แล้ว

    Thank you very much for the lesson , which design pattern you used here ?

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

    Thank you!

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

    nice video bro 👌🏾

  • @daniellaerachannel
    @daniellaerachannel 4 ปีที่แล้ว

    amazing video !

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

    The intro made me thought it was an ad, so i actually tried to skip the video in the first second xD

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

    Great video!!!
    I have a question regarding assertThat. In the current example (16:02) you import the assert from Assertions.assertThat(org.assertj.core.api). In another video th-cam.com/video/Geq60OVyBPg/w-d-xo.html (28:20) you import assertThat from AssertionsForClassTypes.assertThat(org.assertj.core.api). What is the difference between these 2 assertThat methods? How can we identify which one we will have to use?
    Thank you!!!

  • @sivaganesh4489
    @sivaganesh4489 4 ปีที่แล้ว

    Please do crash course on react

  • @paulntalo1425
    @paulntalo1425 4 ปีที่แล้ว

    How possible can we be getting some of your courses on Udemy.

    • @magicalvibez2037
      @magicalvibez2037 4 ปีที่แล้ว

      Why you want them on udemy, when you have the courses here for free?

    • @paulntalo1425
      @paulntalo1425 4 ปีที่แล้ว

      @@magicalvibez2037 This is just a sample chapter of the full course.

    • @amigoscode
      @amigoscode  4 ปีที่แล้ว

      Full course on my website

  •  2 ปีที่แล้ว

    your membrane keyboard is killing me. how can you use that thing? haha

  • @pranavpothiwala4741
    @pranavpothiwala4741 4 ปีที่แล้ว

    I have good knowledge and exposure on testing manual and automatio
    Knowledge of api testing and mobile testing
    I am searching for job here in uk if you have any connects can you plz share with me
    Thank you
    Regards Pranav

  • @sub_zero_911
    @sub_zero_911 4 ปีที่แล้ว

    A - A - A 👈 Your TTD Three Musketeers
    Arrange
    Act
    Assert

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

    completed

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

    Shouldn't it be : fail test - > refactoring - > pass test

  • @buddhika71
    @buddhika71 4 ปีที่แล้ว

    great !

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

    Pls provide us notes sir

  • @adamoumamadou4946
    @adamoumamadou4946 4 ปีที่แล้ว

    Thanks

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

    Hey Assaloumou alekum brother by the your face look great! I mean nice look

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

      Thanks brother

  • @pabloinberlin
    @pabloinberlin 4 ปีที่แล้ว

    I recommend having a look at how CakePHP deals with fixtures using factories:
    th-cam.com/video/PNA1Ck2-nVc/w-d-xo.html
    github.com/vierge-noire/cakephp-fixture-factories

  • @md.nasiruddinbhuiyan9268
    @md.nasiruddinbhuiyan9268 2 ปีที่แล้ว

    too much ads in a single video. :(

  • @AhmedSM8
    @AhmedSM8 4 ปีที่แล้ว

    I would love to join your course but it is expensive bro $34.99

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

      it´s giving you a good start into a well paid job.

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

      @@MrBayoumi i bought it it is very good course🙆‍♂️

  • @TALOS93L
    @TALOS93L 4 ปีที่แล้ว

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

    Guys, just skip first 10 min. Crash course, my class.

  • @elrey1062
    @elrey1062 4 ปีที่แล้ว

    First Viewer... lol

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

      hahah

    • @elrey1062
      @elrey1062 4 ปีที่แล้ว

      @@amigoscode Thanks for the video though, good stuff. You're the best.

  • @l4m5
    @l4m5 4 ปีที่แล้ว

    1st

  • @tonylegge7261
    @tonylegge7261 4 ปีที่แล้ว

    I can’t watch anymore..... what a horrible language java is. Thank goodness for Golang. BTW if you really want to learn TDD then get the book, Test Driven Development by Example written by Kent Beck.

    • @amigoscode
      @amigoscode  4 ปีที่แล้ว

      yep I love GoLang too

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

    Hi Amigoscode unable to join discord group the invitation link is not working