A simple unit test for GUIs
Last time I described why GUI code is difficult to unit test, and why it's generally better to avoid doing so. But that doesn't mean GUI-related code shouldn't be tested - you just need to separate out the logic. Easier said than done? The number of times I've spoken to Java GUI coders who've said: "Swing code can't be unit- …
Thanks for that!
I've been working with Microsofts Composite UI Application Block and Smart Client Software Factory for a while now, and until this point haven't found a reasonable explanation or demonstration of how to code SmartParts (the panel in you example) and their controllers. I think I now "get it"!
Humble Dialog Box
A very nice description of the Humble Dialog Box patter as explained by Martin Fowler.
I have no idea what language you are using, but I have had a lot of success using jfcUnit with Java / Swing applications. End up writing unit test that can interact with the GUI.
When I am not using Swing I use the PresentationModel pattern, where I place all the login in the PresentationModel and simply have the GUI connected to the model via binding listeners.
Popular Whitepapers
- Linux on the Desktop
Lessons from mainstream business adoption - The Register Guide to iSCSI
A primer on Internet SCSI, a protocol to transport SCSI commands over IP - The BI Inflexion Point
Information is a right, not a privilege - The Evolving Security Landscape
Reg Webinar - The Register Guide to email security
A primer on the challenges of securing email and approaches to resolving them - The Register's Green Computing Debate
An on-demand webcast


