Previous Topic

Next Topic

Book Contents

Book Index

For the JUnit 5 Model

Overview

The JUnit 5 Testing Framework (TFW) is composed of a custom runner and reporter implementation (as defined by the TEE API), and also contains a subset of the standard JUnit 5 modules. They are contained in the JUnit 5 TFW bundle – com.prosyst.mbs.tee.tfw.junit5.jar.

The JUnit 5 itself consists of the JUnit Platform, JUnit Jupiter, and helper librariesopentest4j and apiguardian:

A JUnit Vintage module also exists, which is not included in TEE since TEE has separate Testing Frameworks for running older versions of JUnit.

At the time of writing the JUnit 5 TFW there are no other testing models other than JUnit Jupiter.

Key Features

JUnit 5 allows:

Requirements

To run JUnit 5 Testing Framework, Java 8 or above is required. However, it can still test code that has been compiled with previous versions of the JDK (Java 5 or above).

Java Annotations

The java core annotations, that can be used in tests are defined in org.junit.jupiter.api package:

More information about the annotations and a thorough guide on writing JUnit 5 tests can be found in the JUnit 5 documentation.

Differences with Previous Versions of JUnit and Useful Tips

See also