How do you write test suites for GUI components?
Marcus von Appen
mva at sysfault.org
Fri Jun 11 16:29:31 CEST 2004
j_mckitrick at bigfoot.com (j_mckitrick) writes:
> What exactly do you test for?
What GUI is exactly discussed here? A specific toolkit? Writing an own
GUI render engine and components?
I am currently writing an own GUI toolkit based on pygame (located at
http://ocemp.sf.net) and my major approach for testing the components will
be the following:
* Testing object instantiation and addition to the render engine
* Testing all public and private methods using various parameters
* Testing the behaviour of the object after modifying (public) attributes
* Testing the event management of the object
* Testing the container behaviour (packed widgets in tables, Frames, etc.)
* Testing collision detection of objects (if wanted)
* Testing the removal of the widget (correct unregistering any events,
deletion of all references, etc.)
* Testing exception handling, if any
* Testing threading behaviour, if any
* Testing the object behaviour, when the renderer attributes (, etc.) change
Though I did not implement any test stuff for my current engine and
componenets I would (and will) always go that way.
I also would place the test framework either in the corresponding module
or into an own module (dependant on the implementation of the toolkit).
We don't understand the software, and sometimes we don't understand the
hardware, but we can *see* the blinking lights!
More information about the Python-list