October 2017
Intermediate to advanced
350 pages
7h 29m
English
The last built-in resolver in JUnit 5 is TestReporterParameterResolver. Again, given a test class, if a method parameter is of type TestReporter, the TestReporterParameterResolver supplies an instance of TestReporter.
TestReporter is used to publish additional data about the test execution. The data can be consumed through the method reportingEntryPublished, and then, it can be requested by IDEs or included in test reports. Each TestReporter object stores information as a map, that is, a key-value collection:

This test provides a simple example of TestReporter. As we can see, we use the injected ...
Read now
Unlock full access