> The cast : > * Adrian Sutton <[EMAIL PROTECTED]> > * Alain Farmer <[EMAIL PROTECTED]> > * Joshua Juran <[EMAIL PROTECTED]> > * Ian Gordon <[EMAIL PROTECTED]>
> Adrian : Here's a problem I'm facing : How do you > test a button? There are certainly some aspects > that are simple to test ... but how do you test > it's reaction to all the different properties > that can be set ... Work in progress. ;-) > Alain : I don't know. I do know that the GUI is not > something that can be tested as readily as GUI-less > code. I will ask the developers of the Montreal XP > group about it, tonight, which is where I'm headed > now. Stay tuned. :) Unit testing the interface remains an unsolved problem, or so it would seem by the reaction I got from half a dozen Java/XP programmers. The code underneath can be readily tested, but they didn't have much to offer for the user-level of a GUI. Solving this will probably earn us an article or more in some scientific journals. I've got the contacts to make this happen. :)) > Ian : maybe writing a script that sets all the > available properties of the btn, in various > combinations, and then gets the property values and > writes then to a log file or at least checks them > for the expected result could be a start. Agreed. > Ian : Also, the test script could even take > snapshots of the btn after different visual > properties have been set and save them for > a quick visual review ... I like this idea. :)) > Josh : I agree that Optical Style Recognition > is not called for here. :-) Funny and true. But we need to invent something like it or, more likely, something much simpler to get the job done, without any optical style recognition as you put it. > Josh : Anyway, maybe someone out there has more > experience with unit testing than I do and can > help me out. I don't have any actual experience > with unit testing, but I have thought about it > a great deal as I consider how to implement it > for myself. The XP group is an excellent source of information on everything involving Extreme Programming (XP), including Unit Testing with jUnit. As y'all may already know, XP insists strenuously on the need to "Test First". Which means that tests are crafted before anything is coded. For more info and continuing assistance, I suggest we join the mailing list[s] of the XP group. I can ask my XP-Montreal buddies to help with some of our inquiries concerning Unit Testing. They've also got a wiki at : http://www.c2.com/cgi/wiki?ExtremeProgrammingRoadmap > Josh : In the case of GUI elements, I > suggest the 'mock object' approach... It's a nice coincidence that you should suggest this coz it just so happens that one of the members of the Mtl XP group, named Vincent, is a huge fan of mocks in Java and has been promoting for weeks the idea of starting an XP project involving mocks, without many/any takers so far. I am sure he would be thrilled to join us in the dev of mocks [for FreeCard]. Stay tuned. :)) > If you were testing a MacOS button, you might > redirect Mac Toolbox calls (via macros, perhaps) > to test code, for ex SizeControl() would call a > test function instead of the real thing. Then > you'd know what size the button would be. Or, you > could verify that the button calls TextFace() (to > set the font) before calling DrawControl(). You > could then call through to the actual OS routine > if desired. Good explanation/example of the usefulness of mocks :)) > Josh : I don't know how you'd map that to Java, > but that's my suggestion. The power of collaboration folks. By expressing what we know, what we don't know, what we'd like, and so on, it is possible for other interested parties to participate complementarily in the process of building something no individual person could hope to achieve on his own (or at least not as easily). In plain english, I *do* know some people and resources to map mocks to Java, and thereby map them to our Java-based FreeCard too. This is a very exciting development. One which I would really like to pursuit with you guys. With Vincent (likely but not confirmed yet), we'd be 5, yes *five* people working on this. ** Let's rock! ** :)) Alain Farmer __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Freecard-general mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freecard-general