Complete JUnit 4 and JUnit 5 course for beginners
4.1 (81 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.
3,725 students enrolled

Complete JUnit 4 and JUnit 5 course for beginners

How to write awesome unit tests with a powerful unit testing framework
4.1 (81 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.
3,725 students enrolled
Created by Nilton Santos
Last updated 12/2019
English
English [Auto]
Current price: $11.99 Original price: $19.99 Discount: 40% off
17 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 3.5 hours on-demand video
  • 1 coding exercise
  • 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
  • You will learn the fundamental concepts of unit testing and how to use JUnit 4 and JUnit 5 to write unit tests
Requirements
  • You should have some familiarity with an Object Oriented programming language
Description

This course is divided in 3 major sections:

Section I:

  1. The fundamental concepts and theory related to unit testing in general, regardless of programming language;

Section II:

  1. The fundamental techniques and features of JUnit 4 (a pre-requisite for part II of the course);

Section III:

  1. The architecture and extension model  introduced in JUnit 5;

  2. The advanced techniques and features introduced in JUnit 5.

If you are a totally new to unit testing in general and unit testing in Java in particular then I highly recommend that you take the three sections in the order presented above.

If you're familiar with JUnit 4 then you may skip Section II. I'd still recommend that you take Section I though since it introduces fundamental concepts that you may not be familiar with pertaining with unit testing in general even if you've some experience in JUnit 4.

Who this course is for:
  • Beginner Java developers interested in learning how to write well designed tests
Course content
Expand all 20 lectures 03:24:19
+ Introduction
1 lecture 02:26

An introduction to the course and why you should consider taking it.

Preview 02:26
+ Fundamental concepts related to unit testing in general
2 lectures 23:36

In this lesson you will learn the anatomy (or structure) common to all JUnit tests

Anatomy of a JUnit test
06:25
+ JUnit 4 basics
6 lectures 01:14:14

JUnit 4 fundamental assertions

Fundamental assertions
11:18

How to write expressive tests using the hamcrest matchers

How to write expressive tests using the hamcrest matchers
13:33

In this lesson you will learn how to tests for code that throw exceptions

How to test for exceptions
11:58

In this lesson you will learn how to write very flexible tests using parameters

Parameterized tests
08:08

In this lesson you will learn how to write tests that use rules

Rules
17:01

In this lesson you will learn how to write tests that use categories and suites

Categories and suites
12:16
+ JUnit 5 features
11 lectures 01:44:03

In this lesson you'll learn why you should consider upgrading your existing JUnit 4 tests to JUnit 5.

Why you should use (or migrate to) JUnit 5
15:50

In this lesson you will learn the architecture and extension model of JUnit 5

JUnit 5 Architecture
14:01

In this lesson you will learn how to setup a JUnit 5 gradle project

How to setup a Gradle project
07:26

In this lesson you will learn how to setup a Maven project

How to setup a Maven project
06:49

In this lesson you will learn how to use the "@Tag" annotation

@Tag annotation
16:39

In this lesson you will learn how to assert a group of assertion using the "assertAll" assertion.

"AssertAll" assertion
08:51

In this lesson you will learn how to convert/migrate a simple JUnit 4 test to JUnit 5

Migration from JUnit 4
04:36

In this lesson you will learn how to migrate existing JUnit 4 tests that use JUnit 4 rules to JUnit 5

JUnit 4 rules migration
02:55

In this lesson you will learn how to write tests using JUnit 5 exception test constructs

JUnit 5 exceptions testing
03:48

In this lesson you will learn how to use the TestInfo feature of JUnit 5

How to use TestInfo
04:40

In this lesson you will learn how to use the "@ParameterizedTest" annotation introduced in JUnit 5

"@ParameterizedTest" annotation
18:28
+ Course project
0 lectures 00:00
Online Reservation System
1 question