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.
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.
May be this http://jfcunit.sourceforge.net/
精彩评论