On Fri, 28 Mar 2025 21:09:55 GMT, Kevin Rushforth 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 t
On Mon, 31 Mar 2025 16:01:39 GMT, Kevin Rushforth wrote:
>> The intent is not to annotate each test, but rather to use this tool to
>> debug the issues in an intermittently failing test.
>
> Hmm. That isn't what I thought we were doing. I thought the idea was to
> annotate most (if not all all)
> 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
On Tue, 1 Apr 2025 20:47:32 GMT, Andy Goryachev wrote:
>> Yes, there are two main approaches we could take:
>>
>> Option 1: A utility that is available for developers to add to one or more
>> specific tests in a branch in their personal fork when debugging failures in
>> those tests. We would
On Tue, 1 Apr 2025 22:42:25 GMT, Kevin Rushforth wrote:
>> Turns out one can't intercept assertion exceptions with
>> `Thread.setDefaultUncaughtExceptionHandler()` (duh!), so this is likely to
>> be a known limitation.
>>
>> We might still provide general purpose methods in `ScreenCapture` (ne
On Tue, 1 Apr 2025 20:11:46 GMT, Kevin Rushforth wrote:
>> There is more than one way to sk^H^H pet the cat.
>>
>> We could use a property to disable (or rather, enable) the screenshots, and
>> only enable the capture during the debugging session. This will prevent us
>> from catching those h
On Fri, 4 Apr 2025 21:55:09 GMT, Andy Goryachev 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
On Fri, 4 Apr 2025 22:09:46 GMT, Andy Goryachev wrote:
>> Actually, Safari is the browser which will show the complete screenshot.
>> Chrome will only show a truncated screenshot, and I don't have Firefox to
>> test.
>
> I was planning to add a decoding tool to the MonkeyTester anyway.
> Actu
On Fri, 4 Apr 2025 22:08:09 GMT, Andy Goryachev wrote:
>> Although apparently not Chrome. :)
>
> Actually, Safari is the browser which will show the complete screenshot.
> Chrome will only show a truncated screenshot, and I don't have Firefox to
> test.
I was planning to add a decoding tool t
On Fri, 4 Apr 2025 21:55:09 GMT, Andy Goryachev 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
On Fri, 4 Apr 2025 22:07:22 GMT, Kevin Rushforth wrote:
>> tests/system/src/test/java/test/util/ScreenCaptureTestWatcher.java line 45:
>>
>>> 43: @Override
>>> 44: public void testFailed(ExtensionContext extensionContext, Throwable
>>> err) {
>>> 45: // the data url can be paste
On Fri, 4 Apr 2025 21:51:34 GMT, Kevin Rushforth wrote:
>> Andy Goryachev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> stderr
>
> tests/system/src/test/java/test/util/ScreenCaptureTestWatcher.java line 45:
>
>> 43: @Override
>> 4
On Fri, 4 Apr 2025 21:43:41 GMT, Kevin Rushforth wrote:
> in a JSON image, you wouldn't have the `""data:image/png;base64,"` prefix?
correct, the prefix would be something else, like
`takeScreenshotBase64("{screenshot:","}");`
-
PR Review Comment: https://git.openjdk.org/jfx/pull/1
On Fri, 4 Apr 2025 21:46:02 GMT, Andy Goryachev wrote:
>>> We are not ready for JSON logs, I admit, but this was the rationale behind
>>> the design of this class:
>>>
>>> * a low-level method that returns byte[]
>>> * a base-64 encoding method that allows for custom prefix/suffix to be able
>
> 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
On Fri, 4 Apr 2025 21:15:37 GMT, Andy Goryachev 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
On Fri, 4 Apr 2025 21:15:37 GMT, Andy Goryachev 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
On Fri, 4 Apr 2025 21:42:39 GMT, Andy Goryachev wrote:
>> One thing that happened recently (in the past 10 years or so) is that JSON
>> became a frequently used format for logs. It's not perfect, but it's easy
>> to parse. With that, json-oriented log viewers came.
>>
>> We don't have a cons
On Fri, 4 Apr 2025 21:39:32 GMT, Andy Goryachev wrote:
>>> hmm, not sure if I share the concern (did I understand the concern?)
>>>
>>> the idea is to have a low-level method `takeScreenshotBase64(prefix,
>>> postfix)` that can be used in non-standard situations, but also provide the
>>> conve
On Fri, 4 Apr 2025 21:28:59 GMT, Kevin Rushforth wrote:
>> hmm, not sure if I share the concern (did I understand the concern?)
>>
>> the idea is to have a low-level method `takeScreenshotBase64(prefix,
>> postfix)` that can be used in non-standard situations, but also provide the
>> convenien
On Fri, 4 Apr 2025 21:11:19 GMT, Andy Goryachev wrote:
> hmm, not sure if I share the concern (did I understand the concern?)
>
> the idea is to have a low-level method `takeScreenshotBase64(prefix,
> postfix)` that can be used in non-standard situations, but also provide the
> convenience met
On Fri, 4 Apr 2025 21:05:52 GMT, Kevin Rushforth wrote:
>> The reason I have prefix and postfix instead of what you are proposing is
>> that in my case only one event is written to the output. This might be
>> important when both stderr and stdout are redirected to the same log file,
>> in wh
> 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
On Fri, 4 Apr 2025 20:44:23 GMT, Andy Goryachev wrote:
> > Maybe add class docs in the utility class
>
> both classes have code samples to illustrate the usage - maybe insufficient.
> any suggestions?
No, I just failed to notice it. My fault.
-
PR Comment: https://git.openjdk.org
On Fri, 4 Apr 2025 20:57:06 GMT, Andy Goryachev wrote:
>> tests/system/src/test/java/test/util/ScreenshotCapture.java line 93:
>>
>>> 91: */
>>> 92: public static void writeScreenshot(PrintStream out) {
>>> 93:
>>> out.println(ScreenshotCapture.takeScreenshotBase64("Screenshot:
On Fri, 4 Apr 2025 20:42:03 GMT, Andy Goryachev wrote:
>> tests/system/src/test/java/test/util/ScreenshotCapture.java line 60:
>>
>>> 58: * @throws IOException when an I/O error occurs
>>> 59: */
>>> 60: public static byte[] takeScreenshot() throws IOException {
>>
>> I have no id
On Fri, 4 Apr 2025 20:30:55 GMT, Kevin Rushforth wrote:
>> Andy Goryachev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> javadoc
>
> tests/system/src/test/java/test/util/ScreenshotCapture.java line 93:
>
>> 91: */
>> 92: publi
On Fri, 4 Apr 2025 20:28:43 GMT, Kevin Rushforth wrote:
>> Andy Goryachev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> javadoc
>
> tests/system/src/test/java/test/util/ScreenshotCapture.java line 107:
>
>> 105: * @return the scr
On Fri, 4 Apr 2025 20:24:16 GMT, Kevin Rushforth wrote:
>> Andy Goryachev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> javadoc
>
> tests/system/src/test/java/test/util/ScreenshotCapture.java line 60:
>
>> 58: * @throws IOExcepti
On Fri, 4 Apr 2025 20:38:08 GMT, Kevin Rushforth wrote:
> Maybe add class docs in the utility class
both classes have code samples to illustrate the usage - maybe insufficient.
any suggestions?
-
PR Comment: https://git.openjdk.org/jfx/pull/1746#issuecomment-2779696634
On Fri, 4 Apr 2025 20:36:32 GMT, Kevin Rushforth wrote:
> One other thing that might be helpful is class docs that describe the two
> different ways of using it (the watcher annotation and the direct call to the
> utility method).
Scratch the first part of this suggestion: the annotation alrea
On Wed, 2 Apr 2025 15:04:54 GMT, Andy Goryachev 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
On Fri, 28 Mar 2025 18:22:56 GMT, Andy Goryachev 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
> 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.
>
> A possible improvement
On Tue, 1 Apr 2025 22:42:25 GMT, Kevin Rushforth wrote:
>> Turns out one can't intercept assertion exceptions with
>> `Thread.setDefaultUncaughtExceptionHandler()` (duh!), so this is likely to
>> be a known limitation.
>>
>> We might still provide general purpose methods in `ScreenCapture` (ne
> 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
On Wed, 2 Apr 2025 14:39:46 GMT, Andy Goryachev 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
On Tue, 1 Apr 2025 21:17:35 GMT, Andy Goryachev wrote:
> We might still provide general purpose methods in ScreenCapture (new class)
> like
That might work. So the idea would be a utility class not tied to a JUnit5
annotation? The usage would then be adding a call to that while debugging a
te
> 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
On Mon, 31 Mar 2025 18:35:03 GMT, Andy Goryachev 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 th
On Tue, 1 Apr 2025 20:11:13 GMT, Kevin Rushforth wrote:
> This suggests that the test watcher doesn't get called until after the
> @AfterEach method has run.
That's entirely possible. I suppose one can register a
Thread::uncaughtExceptionHandler and call a static method, something like
Scree
On Tue, 1 Apr 2025 19:51:16 GMT, Kevin Rushforth wrote:
>> Andy Goryachev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> data url
>
> tests/system/src/test/java/test/util/ScreenCaptureTestWatcher.java line 59:
>
>> 57: public void
On Mon, 31 Mar 2025 16:59:31 GMT, Andy Goryachev wrote:
>> Hmm. That isn't what I thought we were doing. I thought the idea was to
>> annotate most (if not all all) screen capture tests, qualified by a system
>> property, enable that property in our CI test runs, so that when we do get
>> inte
On Mon, 31 Mar 2025 18:35:03 GMT, Andy Goryachev 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 th
On Fri, 28 Mar 2025 21:00:47 GMT, Kevin Rushforth 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 t
On Fri, 28 Mar 2025 21:10:46 GMT, Kevin Rushforth wrote:
>> Andy Goryachev has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - testing: inject a failure
>> - review comments
>
> tests/system/src/test/java/test/util/ScreenCaptureTestWatche
> 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.
>
> A possible improvement
On Fri, 28 Mar 2025 21:31:45 GMT, Kevin Rushforth wrote:
>> tests/system/src/test/java/test/util/ScreenCaptureTestWatcher.java line 77:
>>
>>> 75: public void testFailed(ExtensionContext extensionContext, Throwable
>>> err) {
>>> 76: err.printStackTrace();
>>> 77: System.err
On Fri, 28 Mar 2025 21:04:00 GMT, Kevin Rushforth 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 t
On Mon, 31 Mar 2025 14:58:11 GMT, Andy Goryachev wrote:
>> tests/system/src/test/java/test/util/ScreenCaptureTestWatcher.java line 47:
>>
>>> 45: *
>>> 46: * This facility takes a screenshot of any failed test, then logs the
>>> base64-encoded screenshot
>>> 47: * to {@code stderr}.
>>
>>
On Fri, 28 Mar 2025 21:07:21 GMT, Kevin Rushforth 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 t
On Fri, 28 Mar 2025 21:21:11 GMT, Kevin Rushforth 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 t
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.
A possible improvement could be to ou
53 matches
Mail list logo