Course

Java Unit Testing and TDD

Master Java Unit Testing and Test-Driven Development (TDD) to build robust, maintainable, and bug-free Java applications with JUnit and best practices.

of video
2.8 h
lectures
47
sections
10

$99.97one payment

Lifetime access. 15-day money-back guarantee.

Want a mentor as well? The Academy gives you every course on Amigoscode plus code reviews, daily live calls and interview prep, for $129/month. Compare →

What you'll learn

By the end of this course

  • Fundamentals of Software Testing - Understand different types of testing and their role in software development.
  • Unit Testing with JUnit - Set up JUnit 5, write test cases, and use assertions to validate logic.
  • AssertJ & Advanced Assertions - Use AssertJ for fluent and expressive tests.
  • Test-Driven Development (TDD) - Learn the Red-Green-Refactor cycle and build features with tests first.
  • Maven & Project Setup - Create and manage Java projects with Maven and write testable code structures.
  • Debugging Failures - Learn how to read assertion errors, use breakpoints, and debug with confidence.
  • Best Practices - Learn how to structure test classes, avoid common mistakes, and write clean test code.
  • Real-World Exercises - Test actual methods and features including grading logic and exception handling.

Curriculum

10 sections, 47 lectures

2.8 h of video. Open any section to see its lectures.

1Intro1 min
  1. 1Recommended Courses
  2. 2Slides
2Getting started7 min
  1. 1What Is Testing3 min
  2. 2Types Of Testing4 min
  3. 3Quiz
3Unit testing26 min
  1. 1What Is Unit Testing4 min
  2. 2Junit2 min
  3. 3Create Maven Project6 min
  4. 4Calculator Test Example6 min
  5. 5Junit Assertions4 min
  6. 6AssertJ5 min
  7. 7Quiz
4Tips and tricks12 min
  1. 1Given When Then Template6 min
  2. 2Generate Tests Class And Methods6 min
5Exploring junit518 min
  1. 1Intro4 min
  2. 2EmailValidator Class3 min
  3. 3EmailValidatorTest6 min
  4. 4More Junit5 Features5 min
6Exercise26 min
  1. 1The Exercise3 min
  2. 2@ParameterizedTest and @CsvSource8 min
  3. 3Testing Exceptions4 min
  4. 4calculateAverage() Test4 min
  5. 5getTopStudents() Test6 min
  6. 6Exercises
7Test driven development26 min
  1. 1What Is TDD3 min
  2. 2TDD In Action Part 17 min
  3. 3TDD In Action Part 25 min
  4. 4TDD In Action Part 34 min
  5. 5TDD In Action Part 46 min
  6. 6Regex Cheatsheet
  7. 7Shipping Cost Calculator Exercise
  8. 8Shipping Cost Calculator Solution
  9. 9Outro1 min
  10. 10Quiz
8Debugging29 min
  1. 1What Is Debugging1 min
  2. 2Reading Assersion Failures6 min
  3. 3System Out Println2 min
  4. 4Debugging Tool Part 18 min
  5. 5Debugging Tool Part 25 min
  6. 6Debugging Exercise5 min
9Best practices21 min
  1. 1Best Practices5 min
  2. 2Should You Test Provate Methods3 min
  3. 3Dont Test Data Classes8 min
  4. 4Maven6 min
  5. 5Quiz
10Outro1 min
  1. 1Feedback
  2. 2Next and Recommended Courses

Choose how you learn

Learn on your own, or with people who check your work

The course is yours to keep. The Academy is this course and every other one, plus the people who get you hired.

Java Unit Testing and TDD

The course, on your own

$99.97one payment

  • 47 lectures, 2.8 h of video
  • Source code for everything you build
  • Subtitles on every video
  • 6 months of IntelliJ IDEA Ultimate
  • Lifetime access to the course and its updates

15-day money-back guarantee

Recommended

The Academy

The courses, plus the people

$129/monthcancel anytime

This course, plus

  • Every course on Amigoscode 50+ in the Zero to Hired Roadmap
  • Daily live calls and 1:1 instructor time
  • Code reviews and pair programming on what you build
  • Interview prep mock interviews, System Design Lab, CV and LinkedIn review
  • Land an interview in 90 days or we coach you 1:1 free until you do.
Join the Academy

7-day money-back guarantee · Secure checkout on Skool

“Nelson was teaching 90% of my job. I was already implementing everything I learnt from it.”
MBMarlon BragaJava Full Stack Software Developer
“I was a totally different person. More confident as a developer, more prepared for my job.”
GabrielaSoftware Engineer at Mercado Livre
“I studied biomedicine and psychology. I found Nelson's Java tutorials while looking for a course for my brother. I was hooked and now here I am, a software engineer at IKEA.”
NajmaSoftware Engineer at IKEA

Read every review →

About this course

Who is this course for?

Level: All (Junior, Mid and Senior Engineers).

How long will it take?

There are about 3 hours of video. Most people finish in a week at 5 hours a week, plus the time you spend building along.

Do I keep access?

Yes. You pay once and keep the course for life, including updates.

What if it isn't for me?

Email us within 15 days of buying and we'll refund you in full.

Should I buy the course or join the Academy?

Buy the course if you only want this topic and you learn well on your own. Join the Academy if you want to get hired or move up: you get every course on Amigoscode, this one included, plus daily live calls, code reviews and interview prep, for $129/month. The course is $99.97 once.