Test Driven Development (TDD) | Crash Course | 2020

  Рет қаралды 128,684

Amigoscode

Amigoscode

Күн бұрын

Testing driven development is a skill that you must develop as a software engineer. In this crash course I will teach test driven development in simple steps.
==========================================
► Full Course can be found here: 🙊 amigoscode.com...
==========================================
► More Courses Available for free here - amigoscode.com...
► Join Private Facebook Group - / 456035171490753
► Join Discord - bit.ly/2wL029v
🙊 Here are the goods for all my videos video:
► Recommended Books
Clean Code
amzn.to/2UGDPlX
HTTP: The Definitive Guide
amzn.to/2JDVi8s
Clean Architecture
amzn.to/2xOBNXW
► Computer and Monitor
New Apple MacBook Pro
amzn.to/3464Mmn
Dell 27 INCH Ultrasharp U2719D Monitor
amzn.to/2xM3nW1
Double Arm Stand Desk Mount
amzn.to/3aYKKfs
USB C Hub Multiport Adapter
amzn.to/2Jz7NlL
► Camera Gear
Sony ILCE7M3B Full Frame Mirrorless Camera
amzn.to/346QIJn
Sigma 16 mm F1.4 DC DN
amzn.to/2wbic3Q
Sigma 33B965 30 mm F1.4 DC DC
amzn.to/39G37Fd
Awesome Screen Saver
github.com/Joh...
IDE I use for coding
Iterm
VsCode
GoLand
IntelliJ
Sublime
💯 You can also follow me here:
► Don't forget to subscribe | bit.ly/2HpF5V8
► Join Closed Facebook Group for discussion and early access videos and courses | bit.ly/2FbuIkx
► Follow me on Instagram | bit.ly/2TSkA9w
► Join Discord - bit.ly/2wL029v
❤️ Thanks for watching

Пікірлер: 122
@amigoscode
@amigoscode 4 жыл бұрын
► 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 жыл бұрын
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 жыл бұрын
As usual, fantastic. Cheers from Brazil!
@amigoscode
@amigoscode 4 жыл бұрын
Thanks
@1337ArMaAa
@1337ArMaAa Ай бұрын
Amazing tutorial :D ! Keep up the good work man!
@AnnieBox
@AnnieBox 3 жыл бұрын
I'm soooo happy that I found another treasure vlogger!!!
@gerardoplus12
@gerardoplus12 Жыл бұрын
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 4 жыл бұрын
Excellent for something I'm not even paying for.
@peterwurst45346
@peterwurst45346 3 жыл бұрын
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 жыл бұрын
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
@123cheke
@123cheke 4 ай бұрын
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.
@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.
@techsolaris1
@techsolaris1 2 жыл бұрын
Excellent video Nelson!
@drcl7429
@drcl7429 2 жыл бұрын
Passes the Uncle Bob quality test.
@mohammadjaouni
@mohammadjaouni 3 жыл бұрын
جزاكم الله خيرا" . Jazaka ALLA khayran Bro
@nayalashmohammad8490
@nayalashmohammad8490 4 жыл бұрын
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 жыл бұрын
Great suggestion! I have been doing lots of Go lately so stay tuned
@developerfilip
@developerfilip 4 жыл бұрын
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 жыл бұрын
I also hate write tests for react apps :p
@alexandrecolautoneto7374
@alexandrecolautoneto7374 2 жыл бұрын
Keep with the good work Bro!
@jainchetan68
@jainchetan68 4 жыл бұрын
You are really doing good job, thank you so much.......
@lowabstractionlevel3910
@lowabstractionlevel3910 Жыл бұрын
Amazing clarity
@SonOfMiguel
@SonOfMiguel 4 жыл бұрын
Great video as always Nelson! Been looking to do more TDD during my internship. Thank you!
@tonylegge7261
@tonylegge7261 3 жыл бұрын
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.
@gurekodok
@gurekodok 3 жыл бұрын
This is amazing, thank you.
@andres98
@andres98 3 жыл бұрын
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?
@albinsjolin649
@albinsjolin649 4 жыл бұрын
Dude, you are doing such good content! Gods work!
@amigoscode
@amigoscode 4 жыл бұрын
Thanks
@Abhishek-tr4oi
@Abhishek-tr4oi 4 жыл бұрын
First one here... I was waiting very eagerly.Thanks🙂
@amigoscode
@amigoscode 4 жыл бұрын
Hope you enjoyed it!
@Abhishek-tr4oi
@Abhishek-tr4oi 4 жыл бұрын
@@amigoscode yes loved it♥️
@pecewu
@pecewu 4 жыл бұрын
Awesome work. Great Java tutorials! Keep it up.
@amigoscode
@amigoscode 4 жыл бұрын
Thanks buddy
@mouradnebhi8833
@mouradnebhi8833 4 жыл бұрын
Thx A lot My Friend, Baraka Allah Fik
@carlosantovito185
@carlosantovito185 4 жыл бұрын
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 жыл бұрын
Statics are evil and difficult to test when you reply on external dependencies
@adesardaryan2142
@adesardaryan2142 4 жыл бұрын
thanks for this awesome chanel nelson .
@amigoscode
@amigoscode 4 жыл бұрын
Glad you enjoy it!
@zakariahossain5149
@zakariahossain5149 4 жыл бұрын
Another great course. Your crash course is like a pro level course. Thanks to Amigos.
@amigoscode
@amigoscode 4 жыл бұрын
thanks Zakaria
@saimonldable
@saimonldable 4 жыл бұрын
Very good example of mockito and TDD. Thank you so much!!
@amigoscode
@amigoscode 4 жыл бұрын
You welcome
@navinmeshram7541
@navinmeshram7541 4 жыл бұрын
Your system is running freaking hot... MacBook Pro with i9 it is.
@Goodtimesmk98
@Goodtimesmk98 4 жыл бұрын
The intro made me thought it was an ad, so i actually tried to skip the video in the first second xD
@chiefxtrc
@chiefxtrc 3 жыл бұрын
why did you drop the TDD in the last part and wrote the service logic first and modified the tests to pass afterwards?
@johncerpa3782
@johncerpa3782 4 жыл бұрын
this is the actual good video
@toyinfatai8150
@toyinfatai8150 3 жыл бұрын
wow! this is good. please can you do a TDD on devices like bikes?
@houssemeddine6522
@houssemeddine6522 4 жыл бұрын
Nice! Waiting for a video on interview questions/process for junior developers. That'd be awesome.
@derrick7968
@derrick7968 4 жыл бұрын
Awesome video, Thanks alot.
@amigoscode
@amigoscode 4 жыл бұрын
Glad you liked it!
@amgaaamgalanbayr3267
@amgaaamgalanbayr3267 3 жыл бұрын
awesome work,thanks
@farrukhahmedsid
@farrukhahmedsid 3 жыл бұрын
Playback speed 1.5x makes it much better.
@mohammedriazkhan6083
@mohammedriazkhan6083 4 жыл бұрын
Great video. Possible video on Domain Driven Design?
@amigoscode
@amigoscode 4 жыл бұрын
Great suggestion!
@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
@danielvega646
@danielvega646 8 ай бұрын
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?
@josephwong2832
@josephwong2832 4 жыл бұрын
Thanks a lot nelson!!!
@KKKZOZ
@KKKZOZ 2 жыл бұрын
Thank you!
@salih.k8939
@salih.k8939 4 жыл бұрын
Nice video as always
@CubaBaila
@CubaBaila 3 жыл бұрын
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
@silverfang312
@silverfang312 4 жыл бұрын
Great video!
@nasuhemreatessoy870
@nasuhemreatessoy870 4 жыл бұрын
You're awesome. Thanks for advice and courses
@amigoscode
@amigoscode 4 жыл бұрын
You welcome
@mega225
@mega225 3 жыл бұрын
Awesome video bro, best video I have seen so far about TDD.
@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.
@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
@JRiyaz
@JRiyaz 4 жыл бұрын
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!!!
@TrendRain
@TrendRain 4 жыл бұрын
can you share your work environment. What are those 2 monitors? Maybe Amazon link?
@daniellaerachannel
@daniellaerachannel 4 жыл бұрын
amazing video !
@amigoscode
@amigoscode 4 жыл бұрын
Thanks
@cliffordowusuamponsah9532
@cliffordowusuamponsah9532 3 жыл бұрын
Please the discord link has expired? Can I get the link again?
@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 ?
@ju_mamba
@ju_mamba 3 жыл бұрын
When building the project I get the follwoing error: java: package javax.persistence does not exist
@vijik2988
@vijik2988 4 жыл бұрын
Mockito and JUNIT testing is it included in software testing please tel me waiting
@R3400l
@R3400l 3 жыл бұрын
What's the font configured in your zsh? It's very readable.
@elClubdelas7Cifras
@elClubdelas7Cifras 11 ай бұрын
completed
3 жыл бұрын
your membrane keyboard is killing me. how can you use that thing? haha
@tinoutech5016
@tinoutech5016 4 жыл бұрын
Thank you very much for the lesson , which design pattern you used here ?
@paragkadam2169
@paragkadam2169 3 жыл бұрын
builder pattern
@gafarraji
@gafarraji Жыл бұрын
Where can I get the full course
@sivaganesh4489
@sivaganesh4489 4 жыл бұрын
Please do crash course on react
@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 kzbin.info/www/bejne/fZbUZ2OFi951hsk (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!!!
@abdirahman1578
@abdirahman1578 4 жыл бұрын
nice video bro 👌🏾
@renejacques8288
@renejacques8288 4 жыл бұрын
I can't find the full course for TDD.
@buddhika71
@buddhika71 4 жыл бұрын
great !
@amigoscode
@amigoscode 4 жыл бұрын
thanks
@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
@adamoumamadou4946
@adamoumamadou4946 4 жыл бұрын
Thanks
@amanpandia7912
@amanpandia7912 Жыл бұрын
Shouldn't it be : fail test - > refactoring - > pass test
@sub_zero_911
@sub_zero_911 4 жыл бұрын
A - A - A 👈 Your TTD Three Musketeers Arrange Act Assert
@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!!!
@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
@techme6053
@techme6053 2 жыл бұрын
Pls provide us notes sir
@thecallertotruth1121
@thecallertotruth1121 4 жыл бұрын
Hey Assaloumou alekum brother by the your face look great! I mean nice look
@amigoscode
@amigoscode 4 жыл бұрын
Thanks brother
@md.nasiruddinbhuiyan9268
@md.nasiruddinbhuiyan9268 2 жыл бұрын
too much ads in a single video. :(
@pabloinberlin
@pabloinberlin 4 жыл бұрын
I recommend having a look at how CakePHP deals with fixtures using factories: kzbin.info/www/bejne/hn-kYnahZ5KhjMU github.com/vierge-noire/cakephp-fixture-factories
@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 жыл бұрын
Guys, just skip first 10 min. Crash course, my class.
@l4m5
@l4m5 4 жыл бұрын
1st
@amigoscode
@amigoscode 4 жыл бұрын
awesome
@elrey1062
@elrey1062 4 жыл бұрын
First Viewer... lol
@amigoscode
@amigoscode 4 жыл бұрын
hahah
@elrey1062
@elrey1062 4 жыл бұрын
@@amigoscode Thanks for the video though, good stuff. You're the best.
@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
Learn SOLID Principles with CLEAN CODE Examples
28:35
Amigoscode
Рет қаралды 286 М.
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
Test-Driven Development // Fun TDD Introduction with JavaScript
12:55
🚀  TDD, Where Did It All Go Wrong (Ian Cooper)
1:03:55
DevTernity Conference
Рет қаралды 577 М.
Test Driven Development (TDD) in Spring
51:09
Dan Vega
Рет қаралды 30 М.
TDD Is The Best Design Technique
19:26
Continuous Delivery
Рет қаралды 53 М.
Functional Programming with Java Streams API
50:00
Amigoscode
Рет қаралды 184 М.
Test Driven Development - What? Why? And How?
17:14
Continuous Delivery
Рет қаралды 90 М.