JUnit 5 Quick Start: Java Unit Testing

How to write and run Java Unit tests using JUnit 5

JUnit asserts and annotations

Test-driven development

How to use JUnit for bug fixes

How to use JUnit for feature requests

The import statements needed to run JUnit

Best practices and coding conventions

How to understand test output


  • Basic experience with Java (creating classes, understanding methods, etc.)
  • Beginner to JUnit


Let’s make things easy! In this quick-start course, students will learn how to write and run JUnit Java unit tests. Imports, annotations, and test output will illustrated and explained.  Best practices are discussed and demonstrated through examples and applications. By the end of the course, students will be able to conduct their own JUnit tests, successfully interpret test output, and incorporate best practices in their software development. The course is taught by a straight-A Ivy League graduate with industry experience in the subject matter.  No prior knowledge of JUnit is required. 

Who this course is for:

  • Java developers (beginner or advanced) who want to learn JUnit

Course content

3 sections • 11 lectures • 34m total lengthExpand all sections

Introduction2 lectures • 4min

  • Introduction: what JUnit is, how it works, and why it is important.04:01
  • Course requirements00:26

JUnit fundamentals8 lectures • 29min

  • Your first JUnit tests: @Test, assertEquals(), assertNotEquals()03:50
  • The assertTrue() and assertFalse() methods.03:32
  • Practice: JUnit methods04:15
  • Fielding a bug report : best-practices demonstration03:25
  • Implementing a feature request : best-practices demonstration04:45
  • @BeforeAll, @AfterAll annotations02:31
  • The assertArrayEquals() method04:15
  • Development practice: performing a bugfix02:40
  • Quiz 15 questions
  • Quiz 24 questions

Course wrap-up1 lecture • 1min

  • Course conclusion00:39

Leave a Reply

Your email address will not be published. Required fields are marked *