...
"@key printer" should be added to tests that expect a printer
These keywords are defined in the jtreg TEST.ROOT file here https://github.com/openjdk/jdk/blob/f6be7fdf22eede767a0ac29b4f1cb770cfdc0b0f/test/jdk/TEST.ROOT#L14
There you can see the full list and some additional explanation.
These can then be used when filtering which tests to run. For example
...
- Disable "ReportCrash" service, it could show modal dialogs for the crashed tests, which break all other tests(see man ReportCrash):
$sudo defaults delete com.apple.ProblemReporter
$sudo defaults write com.apple.CrashReporter DialogType none
...
Screen resolution should be at least 1920x1080 and 24 or 32 bit colour. Don't enable desktop fractional scaling or anything like that. It may not cause any failures but is still recommended.
Wayland
java.awt.Robot in Wayland sessions may not always achieve the desired result using only the X11 API.
XDG Screencast/Remote Desktop portals can be used for screen capture/mouse or keyboard control. They require consent from the user for these actions.
For automated testing purposes, it makes sense to perform a one-time manual task that calls all required Robot methods to invoke this consent dialog and provide the maximum available permissions (select all displays, remember this selection, allow remote interaction).