Top Description Methods
org.junit.jupiter.api

public @Interface DisplayName

extends Annotation
Annotations
@Target:TYPE, METHOD
@Retention:RUNTIME
@Documented
@API
status:STABLE
since:5.0
Static Imports
org.apiguardian.api.API.Status.STABLE

@DisplayName is used to declare a custom display name for the annotated test class or test method.

Display names are typically used for test reporting in IDEs and build tools and may contain spaces, special characters, and even emoji.

Since
5.0
See Also
Test, Tag, TestInfo, DisplayNameGeneration, DisplayNameGenerator

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a custom display name; never blank or consisting solely of whitespace
value
()

Custom display name for the annotated class or method.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String value()

Custom display name for the annotated class or method.

Returns:String

a custom display name; never blank or consisting solely of whitespace