RFR: 7903324: Improve per-class reporting of JUnit tests, in .jtr file [v2]

Jonathan Gibbons jjg at openjdk.org
Fri Nov 4 20:15:13 UTC 2022


On Tue, 27 Sep 2022 13:52:20 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> With TestNG, the "test $testname: $result" messages show up in the jtr System.out section. If a test prints anything then it will inlined and appear before the message emitted by TestNG. So this will take a bit of getting used to.
>
> It's just a matter of remembering that testng uses System.out while junit uses System.err. If you use logging in your tests (either directly or by enabling logging for the lib you're using - e.g. http traces) then these traces will go to System.err. In some cases I had to go out of my way to configure the logging to go to System.out instead when using testng. So System.err is probably less surprising unless you come from testng ;-)

See https://en.wikipedia.org/wiki/Standard_streams
Generally, `stdout` is normally reserved for output relating to the function of a tool, like command-line help, and `tier` is used for diagnostics and logging messages.

-------------

PR: https://git.openjdk.org/jtreg/pull/127


More information about the jtreg-dev mailing list