RFR: 8319555: [TestBug] Utility for creating instruction window for manual tests [v4]

Kevin Rushforth kcr at openjdk.org
Mon Apr 8 22:23:09 UTC 2024


On Mon, 8 Apr 2024 15:04:24 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> ## ManualTestWindow
>> 
>> This facility provides a framework for manual tests to display test instructions, test pane, and Pass/Fail buttons.
>> 
>> A simple test would look like this:
>> 
>> 
>> public class SampleManualTest {
>>      public static void main(String[] args) throws Exception {
>>          ManualTestWindow.builder().
>>              title("Sample Manual Test").
>>              instructions(
>>                  """
>>                  Provide
>>                  multi-line instructions here.
>>                  """
>>              ).
>>              ui(() -> createTestUI()).
>>              buildAndRun();
>>      }
>> 
>>      private static Node createTestUI() {
>>          return new Label("Test UI");
>>      }
>> }
>> 
>> 
>> Resulting application window:
>> 
>> ![ManualTestWindow](https://github.com/openjdk/jfx/assets/107069028/15b34a8f-cb0d-4469-85bc-ec5962e448c7)
>> 
>> Readme:
>> 
>> https://github.com/openjdk/jfx/blob/1cc095049be3773e1211ad570eb2285f08f25cec/tests/manual/util/README.md
>> 
>> @prrace 's test EmojiTest has been converted to use the new test window as a demonstration (also fixed the Eclipse project so it works now).
>> 
>> Q: What other features can be added to the test window?
>> 
>> Edit: the sources are left in their original place at the root of the project.
>
> Andy Goryachev has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - works
>  - .

I left one general comment inline. I also have a question about how to build this without a build script given that the utility is in a separate directory tree from the test application (EmojiText) that you updated to use this?

At a minimum, you need instructions for compiling and running it on the command line, but it might be better to defer this until we can wire up the manual tests to the build (which would be a good test sprint task).

tests/manual/text/EmojiTest.java line 34:

> 32: import com.oracle.util.testing.ManualTestWindow;
> 33: 
> 34: public class EmojiTest {

Our existing manual tests all extend `Application`. Is there a reason this has to change? Absent a compelling reason, I'd prefer to not require test apps to stop extending Application in order to use this utility.

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

PR Review: https://git.openjdk.org/jfx/pull/1413#pullrequestreview-1987493781
PR Review Comment: https://git.openjdk.org/jfx/pull/1413#discussion_r1556482838


More information about the openjfx-dev mailing list