The cast : 

* Adrian Sutton  <[EMAIL PROTECTED]>
* Alain Farmer  <[EMAIL PROTECTED]>
* Joshua Juran <[EMAIL PROTECTED]>
* Ian Gordon <[EMAIL PROTECTED]>

The messages :

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 ...

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. :)

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.

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 ...

Josh : No, I agree that Optical Style Recognition is
not called for here.  :-)

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.

Josh : In the case of GUI elements, I suggest the
'mock object' approach:  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.

Josh : I don't know how you'd map that to Java,
but that's my suggestion.

__________________________________
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

Reply via email to