RFR: 8319555: [TestBug] Utility for creating instruction window for manual tests
Kevin Rushforth
kcr at openjdk.org
Tue Mar 26 18:28:28 UTC 2024
On Wed, 20 Mar 2024 20:21:30 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:
>
> 
>
> 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 and moved sources to src/, still using the default package).
>
> Q: Do we want to avoid using the default package?
>
> Q: What other features can be added to the test window?
Not a review, but just a general comment or two.
> EmojiTest has been converted to use the new test window as a demonstration
That seems reasonable, but...
> (also fixed the Eclipse project and moved sources to src/, still using the default package).
I'm not sure how much value there is in moving the files under a "src" directory without also providing a build script (ant or gradle) to be able to build it. We don't currently have the manual tests wired up to the build, so there is no good way to depend on anything outside of the directory in question (at least not without using an IDE, which is a developer convenience, not a build system). That should probably be solved first.
> Q: Do we want to avoid using the default package?
For all manual tests? Probably not.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1413#issuecomment-2021181296
More information about the openjfx-dev
mailing list