I have an idea for a JSR, but I
This functionality might be interesting to implement as an MXBean. Instead of listening on some custom port.
I suggest you repost here:
Java GUI Testing Group
I doubt a JSR would be approved for this. Non-GUI (JUnit, TestNG, etc...) unit testing is much better understood and well established, yet has no official Java presence via a JSR.
Abbot is probably the leading open-source tool for Java GUI testing. That would be a good place to start.
The approach you are suggesting might ultimately require a custom Toolkit/GraphicsEnvironment. In theory, those are pluggable although implementation is quite a bit of work. I vaguely remember some company implementing a custom Toolkit/GraphicsEnvironment for GUI testing, but can't find a link. Fortunately, you can do a lot by adding a Toolkit listener.
One approach to Java GUI testing is outline here:
"XP Testing a GUI with FIT, Fitnesse, and Abbot"
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.