TestFirstUserInterfaces fields frequent JavaSwing questions, so here's a list of citations to some answers...
-
UnitTestingInJava - How Tests Drive the Code
- http://www.amazon.com/exec/obidos/ASIN/1558608680
- "The book teaches how to use JUnit to develop applications in a TestDrivenDevelopment style and covers advanced topics, eg. Web applications, GraphicalUserInterfaces, databases and threaded apps.
- "Search within http://www.mkp.com to download forewords, table of contents and sample chapter which is about test-first development of Java Swing GUIs." --JohannesLink
-
http://groups.yahoo.com/group/TestFirstUserInterfaces/message/63
- a beautiful post by AndrewForward, including a code sample and lists of very specific useful concepts
- "My current project is Java using AWT / Swing with testing help from JUnit... In essence, before I write any production code (even for the GUI) - I really try and consider what I want a certain component (button, menu, panel, etc) to do and I figure out how I can assert it has just done what I expected (right, TDD). Perhaps because GUI libraries are already so huge that we might think TDD won't work - but it does.
-
http://groups.yahoo.com/group/TestFirstUserInterfaces/message/193
- my search cited Swing in-passim there, but the post also contains a very nice sumary of general TestFirstUserInterfaces issues ;-)
-
- "Here is an example test, which adds a subtree of business nodes to a structure represented by a JTree, saves it, deletes the top of the subtree, and finally confirms that all of the subnodes below are removed as well."
-
http://www.superlinksoftware.com/cgi-bin/jugwiki.pl?TestingGUIs
- mentions Abbot, at http://sourceforge.net/projects/abbot
- and JfcUnit, at http://sourceforge.net/projects/jfcunit/