JUnit 5 Display Names

In JUnit 5, we can use @DisplayName to declare custom display names for test classes and test methods. P.S Tested with JUnit 5.5.2 1. @DisplayName 1.1 Default name of test classes and methods. DisplayNameTest.java package com.mkyong.display; import org.junit.jupiter.api.Test; public class DisplayNameTest { @Test void test_spaces_ok() { } @Test void test_spaces_fail() { } } Output +– …

Read more