Test Driven Development (TDD) | Crash Course | 2020

  Рет қаралды 123,090

Amigoscode

Amigoscode

4 жыл бұрын

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/courses/softwa...
==========================================
► More Courses Available for free here - amigoscode.com/courses
► 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/JohnCoates/Aerial
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

Пікірлер: 120
@amigoscode
@amigoscode 4 жыл бұрын
► Clone repo here: github.com/amigoscode/software-testing ► Join Private Facebook Group - facebook.com/groups/45603...
@LaMarLP55
@LaMarLP55 3 жыл бұрын
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 Жыл бұрын
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
@mohammadjaouni
@mohammadjaouni 2 жыл бұрын
جزاكم الله خيرا" . Jazaka ALLA khayran Bro
@AnnieBox
@AnnieBox 2 жыл бұрын
I'm soooo happy that I found another treasure vlogger!!!
@renejacques8288
@renejacques8288 3 жыл бұрын
Excellent for something I'm not even paying for.
@jainchetan68
@jainchetan68 4 жыл бұрын
You are really doing good job, thank you so much.......
@NGUmrra1n
@NGUmrra1n 4 жыл бұрын
Great video as always Nelson! Been looking to do more TDD during my internship. Thank you!
@andres98
@andres98 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?
@gerardoplus12
@gerardoplus12 4 ай бұрын
Wow! I like this post. Very good, I learned a lot of things. I'll watch the other videos! You are a good teacher
@gurekodok
@gurekodok 2 жыл бұрын
This is amazing, thank you.
@pecewu
@pecewu 4 жыл бұрын
Awesome work. Great Java tutorials! Keep it up.
@amigoscode
@amigoscode 4 жыл бұрын
Thanks buddy
@saimonldable
@saimonldable 4 жыл бұрын
Very good example of mockito and TDD. Thank you so much!!
@amigoscode
@amigoscode 4 жыл бұрын
You welcome
@albinsjolin649
@albinsjolin649 4 жыл бұрын
Dude, you are doing such good content! Gods work!
@amigoscode
@amigoscode 4 жыл бұрын
Thanks
@techsolaris1
@techsolaris1 Жыл бұрын
Excellent video Nelson!
@josephwong2832
@josephwong2832 3 жыл бұрын
Thanks a lot nelson!!!
@lowabstractionlevel3910
@lowabstractionlevel3910 5 ай бұрын
Amazing clarity
@mouradnebhi8833
@mouradnebhi8833 3 жыл бұрын
Thx A lot My Friend, Baraka Allah Fik
@nasuhemreatessoy870
@nasuhemreatessoy870 4 жыл бұрын
You're awesome. Thanks for advice and courses
@amigoscode
@amigoscode 4 жыл бұрын
You welcome
@amgaaamgalanbayr3267
@amgaaamgalanbayr3267 2 жыл бұрын
awesome work,thanks
@houssemeddine6522
@houssemeddine6522 4 жыл бұрын
Nice! Waiting for a video on interview questions/process for junior developers. That'd be awesome.
@KKKZOZ
@KKKZOZ Жыл бұрын
Thank you!
@adesardaryan2142
@adesardaryan2142 4 жыл бұрын
thanks for this awesome chanel nelson .
@amigoscode
@amigoscode 4 жыл бұрын
Glad you enjoy it!
@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
@derrick7968
@derrick7968 4 жыл бұрын
Awesome video, Thanks alot.
@amigoscode
@amigoscode 4 жыл бұрын
Glad you liked it!
@alexandrecolautoneto7374
@alexandrecolautoneto7374 Жыл бұрын
Keep with the good work Bro!
@toyinfatai8150
@toyinfatai8150 2 жыл бұрын
wow! this is good. please can you do a TDD on devices like bikes?
@silverfang312
@silverfang312 3 жыл бұрын
Great video!
@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
@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
@zakariahossain5149
@zakariahossain5149 4 жыл бұрын
Another great course. Your crash course is like a pro level course. Thanks to Amigos.
@amigoscode
@amigoscode 4 жыл бұрын
thanks Zakaria
@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♥️
@johncerpa3782
@johncerpa3782 3 жыл бұрын
this is the actual good video
@detaaditya6237
@detaaditya6237 3 жыл бұрын
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
@salih.k8939
@salih.k8939 3 жыл бұрын
Nice video as always
@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
@daniellaerachannel
@daniellaerachannel 4 жыл бұрын
amazing video !
@amigoscode
@amigoscode 4 жыл бұрын
Thanks
@adamoumamadou4946
@adamoumamadou4946 4 жыл бұрын
Thanks
@mega225
@mega225 3 жыл бұрын
Awesome video bro, best video I have seen so far about TDD.
@mohammedriazkhan6083
@mohammedriazkhan6083 4 жыл бұрын
Great video. Possible video on Domain Driven Design?
@amigoscode
@amigoscode 4 жыл бұрын
Great suggestion!
@chiefxtrc
@chiefxtrc 2 жыл бұрын
why did you drop the TDD in the last part and wrote the service logic first and modified the tests to pass afterwards?
@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!!!
@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 ?
@drcl7429
@drcl7429 Жыл бұрын
Passes the Uncle Bob quality test.
@tinoutech5016
@tinoutech5016 3 жыл бұрын
Thank you very much for the lesson , which design pattern you used here ?
@paragkadam2169
@paragkadam2169 2 жыл бұрын
builder pattern
@TrendRain
@TrendRain 3 жыл бұрын
can you share your work environment. What are those 2 monitors? Maybe Amazon link?
@navinmeshram7541
@navinmeshram7541 3 жыл бұрын
Your system is running freaking hot... MacBook Pro with i9 it is.
@mxledesma
@mxledesma Жыл бұрын
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.
@danielvega646
@danielvega646 16 күн бұрын
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?
@stuartbiggs1278
@stuartbiggs1278 11 ай бұрын
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
@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
@R3400l
@R3400l 2 жыл бұрын
What's the font configured in your zsh? It's very readable.
@buddhika71
@buddhika71 4 жыл бұрын
great !
@amigoscode
@amigoscode 4 жыл бұрын
thanks
@vijik2988
@vijik2988 3 жыл бұрын
Mockito and JUNIT testing is it included in software testing please tel me waiting
@elClubdelas7Cifras
@elClubdelas7Cifras 3 ай бұрын
completed
@sivaganesh4489
@sivaganesh4489 4 жыл бұрын
Please do crash course on react
@ju_mamba
@ju_mamba 2 жыл бұрын
When building the project I get the follwoing error: java: package javax.persistence does not exist
@farrukhahmedsid
@farrukhahmedsid 2 жыл бұрын
Playback speed 1.5x makes it much better.
@gafarraji
@gafarraji 10 ай бұрын
Where can I get the full course
@renejacques8288
@renejacques8288 3 жыл бұрын
I can't find the full course for TDD.
@cliffordowusuamponsah9532
@cliffordowusuamponsah9532 2 жыл бұрын
Please the discord link has expired? Can I get the link again?
@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
@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.
@abdirahman1578
@abdirahman1578 4 жыл бұрын
nice video bro 👌🏾
@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
@TALOS93L
@TALOS93L 3 жыл бұрын
@ainigma100
@ainigma100 2 жыл бұрын
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!!!
@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 2 жыл бұрын
@@amigoscode same!!!
2 жыл бұрын
your membrane keyboard is killing me. how can you use that thing? haha
@tonylegge7261
@tonylegge7261 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.
@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
@thecallertotruth1121
@thecallertotruth1121 4 жыл бұрын
Hey Assaloumou alekum brother by the your face look great! I mean nice look
@amigoscode
@amigoscode 4 жыл бұрын
Thanks brother
@techme6053
@techme6053 Жыл бұрын
Pls provide us notes sir
@amanpandia7912
@amanpandia7912 8 ай бұрын
Shouldn't it be : fail test - > refactoring - > pass test
@l4m5
@l4m5 4 жыл бұрын
1st
@amigoscode
@amigoscode 4 жыл бұрын
awesome
@pabloinberlin
@pabloinberlin 3 жыл бұрын
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🙆‍♂️
@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.
@tandzan
@tandzan Жыл бұрын
Guys, just skip first 10 min. Crash course, my class.
@md.nasiruddinbhuiyan9268
@md.nasiruddinbhuiyan9268 2 жыл бұрын
too much ads in a single video. :(
@tonylegge7261
@tonylegge7261 3 жыл бұрын
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 3 жыл бұрын
yep I love GoLang too
@obaidnaqi2016
@obaidnaqi2016 Жыл бұрын
Hi Amigoscode unable to join discord group the invitation link is not working
ТАМАЕВ vs ВЕНГАЛБИ. Самая Быстрая BMW M5 vs CLS 63
1:15:39
Асхаб Тамаев
Рет қаралды 3,8 МЛН
Они убрались очень быстро!
00:40
Аришнев
Рет қаралды 3 МЛН
Learn SOLID Principles with CLEAN CODE Examples
28:35
Amigoscode
Рет қаралды 260 М.
Test Driven Development vs Behavior Driven Development
18:42
Continuous Delivery
Рет қаралды 149 М.
10 Spring and Spring Boot Common Mistakes You Need To STOP
15:49
Amigoscode
Рет қаралды 139 М.
Test Driven Development (TDD) in Spring
51:09
Dan Vega
Рет қаралды 21 М.
🚀  TDD, Where Did It All Go Wrong (Ian Cooper)
1:03:55
DevTernity Conference
Рет қаралды 549 М.
5 Coding Projects (from beginner to advanced)
18:10
ForrestKnight
Рет қаралды 286 М.
🚀  Does TDD Really Lead to Good Design? (Sandro Mancuso)
58:00
DevTernity Conference
Рет қаралды 42 М.
The 3 Types of Unit Test in TDD
17:19
Continuous Delivery
Рет қаралды 99 М.
WWDC 2024 - June 10 | Apple
1:43:37
Apple
Рет қаралды 10 МЛН
How To Unlock Your iphone With Your Voice
0:34
요루퐁 yorupong
Рет қаралды 22 МЛН
ПОКУПКА ТЕЛЕФОНА С АВИТО?🤭
1:00
Корнеич
Рет қаралды 1,5 МЛН