Package org.junit.jupiter.api
Interface TestReporter
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface @API(status=STABLE, since="5.0") public interface TestReporter
Parameters of typeTestReporter
can be injected into@BeforeEach
and@AfterEach
lifecycle methods as well as methods annotated with@Test
,@RepeatedTest
,@ParameterizedTest
,@TestFactory
, etc.Within such methods the injected
TestReporter
can be used to publish report entries.- Since:
- 5.0
- See Also:
publishEntry(Map)
,publishEntry(String, String)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
publishEntry(String key, String value)
Publish the supplied key-value pair as a report entry.void
publishEntry(Map<String,String> map)
Publish the supplied map of key-value pairs as a report entry.
-
-
-
Method Detail
-
publishEntry
void publishEntry(Map<String,String> map)
Publish the supplied map of key-value pairs as a report entry.- Parameters:
map
- the key-value pairs to be published; nevernull
; keys and values within entries in the map also must not benull
or blank- See Also:
publishEntry(String, String)
-
publishEntry
default void publishEntry(String key, String value)
Publish the supplied key-value pair as a report entry.- Parameters:
key
- the key of the entry to publishvalue
- the value of the entry to publish- See Also:
publishEntry(Map)
-
-