@API(value=Experimental)
public interface TestInfo
TestInfo is used to inject information about the current test
into to @Test, @BeforeEach, @AfterEach,
@BeforeAll, and @AfterAll methods.
If a method parameter is of type TestInfo, JUnit will supply
an instance of TestInfo corresponding to the current test as the
value for the parameter.
Test,
DisplayName| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDisplayName()
Get the display name of the current test.
|
java.lang.String |
getName()
Get the name of the current test.
|
java.lang.String getName()
nullgetDisplayName()java.lang.String getDisplayName()
The display name is either the canonical name of the test or a
custom name configured via @DisplayName.
nullgetName()