Integrated: 8328716: [TestBug] Screen capturing utility for failed tests
Andy Goryachev
angorya at openjdk.org
Fri Apr 4 22:24:00 UTC 2025
On Fri, 28 Mar 2025 18:22:56 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
> Introduce a facility, in the form of JUnit5 annotation, to allow for capturing a desktop screenshot of a failed test.
>
> The primary intent is to be able to debug an intermittent test case, rather than wholesale addition of the new annotation to all the tests.
>
> The log contains a base-64 encoded screenshot (like this: `data:image/png;base64,iVBORw0KGgoAAAANSUhEU...` )
> so it can be rendered in Safari (Chrome truncates the image possibly due to following a url length limit)
>
> Additionally, provided a utility class to capture the screenshots at the specific point in a test and write it to stdout/stderr:
>
>
> // write a base-64 encoded screenshot to stderr
> ScreenshotCapture.writeScreenshot(System.err);
>
>
> Example:
>
> 
This pull request has now been integrated.
Changeset: f31d00d8
Author: Andy Goryachev <angorya at openjdk.org>
URL: https://git.openjdk.org/jfx/commit/f31d00d8f7e601c3bb28a9975dd029390ec92173
Stats: 320 lines in 4 files changed: 203 ins; 117 del; 0 mod
8328716: [TestBug] Screen capturing utility for failed tests
Reviewed-by: kcr
-------------
PR: https://git.openjdk.org/jfx/pull/1746
More information about the openjfx-dev
mailing list