publish report
Hi, This repo is a great ource of information! I do have a question about the benchmark tests that record the test runtime. At some point in the code you do "context.publishReportEntry". Where does this end up? I've run the tests, everything but cannot see any of this information in any output file or console. How does that work? How do I get it into a test report for example? It would be great if you could shed some light on it.
P.S. reason I'm looking in this area is because I want to record all tests that will blow up (time bomb) within a certain time. I have all the information just cannot get it anywhere useful where something can pick up this information
Hey Darkvater, I hope my reply isn't too late. Sorry it took so long.
From section 2.12:
The data can be consumed via the
reportingEntryPublished()method in aTestExecutionListener, allowing it to be viewed in IDEs or included in reports.In JUnit Jupiter you should use
TestReporterwhere you used to print information tostdoutorstderrin JUnit 4. Using@RunWith(JUnitPlatform.class)will output all reported entries tostdout. In addition, some IDEs print report entries tostdoutor display them in the user interface for test results.
IntelliJ shows report entries in the run/debug panel for tests.
Also, check section 4.7.
And since you're interested in this feature, take a look at JUnit Pioneer's @Stopwatch extension (Pioneer is a JUnit extension pack I co-maintain.)