Testing of GUI?
Ned Konz
ned at bike-nomad.com
Wed Jul 24 15:07:21 UTC 2002
On Saturday 20 July 2002 09:51 am, Jerome Chan wrote:
> Does anyone have any hints of how to test GUIs under squeak? I'm
> thinking of exposing all the elements (buttons lists windows) as a
> sub-class and then using smalltalk to simulate the button presses
> and keystrokes.
I've been working on an extension for the TestRunner that uses a
modified EventRecorder and a locally constructed PasteUpMorph that
acts as a reference frame/container for the components under test.
During development of the tests, you can interact with the components
in the PasteUpMorph and the interaction will be recorded. There is a
pause/continue button (and keystroke?) that lets you control what
gets recorded.
Whenever you want, the recorded events are spit out in a printable
form, included in a newly written test method. You then add asserts,
etc. as needed. Every pause generates a space for your own code in
the method.
By using a local PasteUpMorph and the TestCase's setUp and tearDown
behavior, I know that my UI components will always be at the same
location (which is a limitation of using the EventRecorder, which
records absolute mouse coordinates).
I haven't had too much time recently to work on this; if someone wants
to see where I am with it, I'd be glad to share it/hand it off.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|