Search code examples
javaswingautomated-testsjemmy

Is there a framework that allow to test specific parameters of Swing elements?


I would like to test some specific parameters of Swing objects (for example: Was border for JLabel painted correctly or not?). Is it possible with current frameworks? I would like to use something like Jemmy or UISpec4J and not recording/playing applications.


Solution

  • The moment you want to test whether something was actually painted correctly, you are pretty much out of luck.

    You'd need to test the interaction between your component and the underlying Swing API. Even that is only if you accept that something is painted if a corresponding call to drawX was made.

    To my knowledge, there is no framework supporting such checks.