On Fri, 4 Apr 2025 21:15:37 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)
>> 
>> 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:
>> 
>> ![jenkins-screenshot](https://github.com/user-attachments/assets/abebd76f-747a-4d6d-a9a6-63c6e9426830)
>
> Andy Goryachev has updated the pull request with a new target base due to a 
> merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains 17 additional 
> commits since the last revision:
> 
>  - review comments
>  - Merge remote-tracking branch 'origin/master' into 8328716.screenshots
>  - javadoc
>  - removed watchers
>  - cleanup
>  - screen capture
>  - data url
>  - testing: inject a failure
>  - review comments
>  - prefix
>  - ... and 7 more: https://git.openjdk.org/jfx/compare/30e49d53...8668ebb1

Thank you for an interesting discussion!

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

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

Reply via email to