Skip to content

Commit 9a28221

Browse files
authoredMar 11, 2025
Automate java_awt interactive robot tests (#6026)
* Add jtrunner robot keyword option Signed-off-by: Andrew Leonard <[email protected]> * Add jtrunner robot keyword option Signed-off-by: Andrew Leonard <[email protected]> * Add jtrunner robot keyword option Signed-off-by: Andrew Leonard <[email protected]> * Add jtrunner robot keyword option Signed-off-by: Andrew Leonard <[email protected]> --------- Signed-off-by: Andrew Leonard <[email protected]>
1 parent 29afcaa commit 9a28221

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed
 

‎jck/jtrunner/JavatestUtil.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public class JavatestUtil {
5151
private static String testExecutionType;
5252
private static String withAgent;
5353
private static String interactive;
54+
private static String robot;
5455
private static String extraJvmOptions = "";
5556
private static String concurrencyString;
5657
private static String timeoutFactorString;
@@ -113,6 +114,7 @@ public class JavatestUtil {
113114
private static final String TEST_EXECUTION_TYPE = "testExecutionType";
114115
private static final String WITH_AGENT = "withAgent";
115116
private static final String INTERACTIVE = "interactive";
117+
private static final String ROBOT = "robot";
116118
private static final String CONFIG = "config";
117119
private static final String CONCURRENCY = "concurrency";
118120
private static final String TIMEOUT_FACTOR = "timeoutFactor";
@@ -138,6 +140,7 @@ public static void main(String args[]) throws Exception {
138140
essentialParameters.add(TEST_EXECUTION_TYPE);
139141
essentialParameters.add(WITH_AGENT);
140142
essentialParameters.add(INTERACTIVE);
143+
essentialParameters.add(ROBOT);
141144
essentialParameters.add(CONFIG);
142145
essentialParameters.add(CONCURRENCY);
143146
essentialParameters.add(TIMEOUT_FACTOR);
@@ -211,6 +214,7 @@ public static void main(String args[]) throws Exception {
211214
testExecutionType = testArgs.get(TEST_EXECUTION_TYPE) == null ? "default" : testArgs.get(TEST_EXECUTION_TYPE);
212215
withAgent = testArgs.get(WITH_AGENT) == null ? "off" : testArgs.get(WITH_AGENT);
213216
interactive = testArgs.get(INTERACTIVE) == null ? "no" : testArgs.get(INTERACTIVE);
217+
robot = testArgs.get(ROBOT) == null ? "no" : testArgs.get(ROBOT);
214218
concurrencyString = testArgs.get("concurrency") == null ? "NULL" : testArgs.get("concurrency");
215219
timeoutFactorString = testArgs.get(TIMEOUT_FACTOR) == null ? "NULL" : testArgs.get(TIMEOUT_FACTOR);
216220
config = testArgs.get(CONFIG) == null ? "NULL" : testArgs.get(CONFIG);
@@ -515,7 +519,11 @@ private static boolean generateJTB() throws Exception {
515519
}
516520

517521
if ( tests.contains("api/java_awt") || tests.contains("api/javax_swing") || tests.equals("api") ) {
518-
keyword += "&!robot";
522+
if ( robot.equals("yes") ) {
523+
keyword += "&robot";
524+
} else {
525+
keyword += "&!robot";
526+
}
519527
}
520528

521529
fileContent += "concurrency " + concurrencyString + ";\n";

‎jck/runtime.api/playlist.xml

+32
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,38 @@
503503
<group>jck</group>
504504
</groups>
505505
</test>
506+
<test>
507+
<testCaseName>jck-runtime-api-java_awt-robot</testCaseName>
508+
<disables>
509+
<disable>
510+
<comment>backlog/issues/608 : To be run manually</comment>
511+
<impl>ibm</impl>
512+
</disable>
513+
<disable>
514+
<comment>backlog/issues/608 : To be run manually</comment>
515+
<impl>openj9</impl>
516+
</disable>
517+
<disable>
518+
<comment>Disabled on aix and windows as no xvfb capable of robot interaction</comment>
519+
<platform>ppc64_aix|x86-64_windows|x86-32_windows|aarch64_windows</platform>
520+
<impl>hotspot</impl>
521+
</disable>
522+
</disables>
523+
<variations>
524+
<variation>NoOptions</variation>
525+
</variations>
526+
<command>$(GEN_JTB_GENERIC) tests=api/java_awt testsuite=RUNTIME interactive=yes robot=yes; \
527+
$(EXEC_RUNTIME_TEST); \
528+
$(TEST_STATUS); \
529+
$(GEN_SUMMARY_GENERIC) tests=api/java_awt testsuite=RUNTIME interactive=yes robot=yes
530+
</command>
531+
<levels>
532+
<level>extended</level>
533+
</levels>
534+
<groups>
535+
<group>jck</group>
536+
</groups>
537+
</test>
506538
<test>
507539
<testCaseName>jck-runtime-api-java_beans</testCaseName>
508540
<disables>

0 commit comments

Comments
 (0)