JUnit 5: Java Unit Tests for Beginners
4.3 (316 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,442 students enrolled

JUnit 5: Java Unit Tests for Beginners

Learn to write Java unit tests in practice with JUnit 5. Online course with exercises and an extra JUnit cheat sheet.
4.3 (316 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,442 students enrolled
Created by Adrian Więch
Last updated 5/2020
English
English [Auto-generated]
Current price: $69.99 Original price: $99.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 1 hour on-demand video
  • 3 articles
  • 6 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Write a variety of unit test types
  • Create practical, real-world test scenarios
  • Follow unit testing best practices
  • Understand JUnit test lifecycle
  • Run unit tests in Eclipse
Course content
Expand all 25 lectures 01:09:05
+ First things first
3 lectures 07:27

Learn about the course, its author and his motivations.

Preview 01:42

Learn the essential theory of unit testing in just a few minutes.

Preview 03:17

Make sure you have the IDE and project files ready.

Preview 02:28
+ JUnit 5 – Basics
8 lectures 26:37

Write your first real-world unit test!

Preview 03:53

Learn the most fundamental rules of good unit tests.

Best practices
03:03
Test exceptions
02:51
Test with multiple assertions
04:53
Test null values
00:59
Test array equality
02:45
@BeforeEach and @AfterEach
06:13
@BeforeAll and @AfterAll
02:00
+ JUnit 5 – More Advanced Concepts
10 lectures 24:56
Parameterized Tests – ValueSource
03:10
Parameterized Tests – CsvSource
03:08
Parameterized Tests – CsvFileSource
02:41
Repeated tests
02:11
Test performance
03:32
Assumptions
02:49
Organise your code with @Nested
03:41
Other annotations
02:47
Summary
00:54
JUnit 5 Cheat Sheet
00:03
+ Additional videos
2 lectures 09:11
JUnit 5 vs. JUnit 4
02:05
Test-Driven Development (TDD)
07:06
+ Exercises
2 lectures 00:53
Write unit tests for RealEstateApp
00:47
Write unit tests for RealEstateApp - solution
00:05
Requirements
  • Basic Java programming skills – you should be able to create classes with fields and methods, recognize primitive data types like int or String, and understand the basics of lists
  • Eclipse IDE – you can download the IDE for free
Description

If you want to apply for your first job as a Java Developer but have never written a unit test before – this is the right course for you.

According to statistics, nearly 80% of all Java developers write unit tests with JUnit, and my developing practice proves it. It is a basic skill required by most employees, so if you want to start your Java Developer professional career, you have to master JUnit.


COURSE OVERVIEW 

In this course, I'll teach you the practical basics of JUnit 5 – the latest version of the most popular Java unit testing framework.

I’ll introduce only the essential theory behind unit testing, and then dive straight into the code to get you started as quickly as possible. I’ll use an example of a simple, yet practical Java project to show you a variety of unit test types. You'll also learn the best practices and coding standards for unit tests based on my developing experience.

This course comes with additional exercises to help you review everything you have learnt from my video lectures. I’ll also provide you with a sample solution to the exercises so that you can compare your answers. As a bonus, you will get a one-page cheat sheet for a quick JUnit 5 reference.


COURSE ADVANTAGES

concise – my short video lectures focused on the most important info help you save time and learn maximally effectively,

based on practice – instead of useless academic theory, you learn the best developing practices drawn from my work experience,

reasonably priced – compared to stationary developer bootcamps, the course is much cheaper, so you save not only time but also money,

available anywhere, anytime – the online form lets you run the course in the most convenient place (at home, work or in a café) and time (while commuting by metro or relaxing at home after work), so you can adjust it to your agenda,

accessible on desktop, mobile and TV – you can display my lectures on the device of your choice, so you don’t have to stick to your PC,

certificate of completion – after completing the course, you will receive a printable certificate that will make your resume more attractive.


Intro video music courtesy of Bensound

Who this course is for:
  • People with basic Java knowledge who want to learn unit testing from scratch
  • Students who want to prepare for their first IT job
  • Developers who know JUnit 4 but want to learn JUnit 5