RFR: 7904153: JTReg should include crash log data in the failure node for xml reports [v2]

William Kemper wkemper at openjdk.org
Thu Feb 19 18:57:36 UTC 2026


On Wed, 18 Feb 2026 17:56:32 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> The system we use (AWS CodeBuild) for running JTReg understands Junit/testNG xml files. For failed tests, it makes the text from the `failure` node easy to access from the UI. I appreciate that these xml files already have `system.err` and `system.out` nodes, but the tooling we use doesn't expose the data here (and I cannot change that tooling). Also, the current implementation takes the first section of `stderr` or `stdout`, which is often empty and comes from the `javac` portion of the test run.
>
> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Use the last output for a section to get the failure. Only do this for the failure node

Out of curiosity, I modified XMLWriter to create a `testcase` node for each `@run` in a jtreg `@test` (it wasn't too hard, really). The result was accepted and verified by the same six junit parsing libraries I checked above. It also works great in AWS CodeBuild, which now shows the `stdout` and `stderr` for each `testcase`. On a new branch here if you are also curious: https://github.com/openjdk/jtreg/compare/master...earthling-amzn:jtreg:insert-testcase-per-run.

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

PR Comment: https://git.openjdk.org/jtreg/pull/316#issuecomment-3929253002


More information about the jtreg-dev mailing list