On Wed, 2 Apr 2025 14:39:46 GMT, Andy Goryachev <ango...@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)
>> 
>> Example:
>> 
>> ![jenkins-screenshot](https://github.com/user-attachments/assets/abebd76f-747a-4d6d-a9a6-63c6e9426830)
>
> Andy Goryachev has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   removed watchers

Adding `ScreenshotCapture.writeScreenshot(System.err);` before the failing line 
in the `RectangleTest` successfully captures the screenshot:

![ss-3](https://github.com/user-attachments/assets/1a2a49bc-6085-4158-b87d-8c788186a8c0)

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

PR Comment: https://git.openjdk.org/jfx/pull/1746#issuecomment-2772815565

Reply via email to