GUI output testing

Richard A. O'Keefe ok at cs.otago.ac.nz
Wed Aug 6 05:22:48 UTC 2003


MFor what it's worth, I've whipped up a handful of changes so that

    |stream|
    stream := CrlfFileStream newFileNamed: 'something.xml'.
    someMorph dumpXmlOn: stream.
    stream close.

will dump the Morph and its descendents as XML.  This shows the class
of each morph, its bounds, colour (if not transparent), border (if width
not 0), label (for some things), and either children or contents.

The greeting "Welcome to..." window dumps as 270 (unwrapped) lines;
a Browser dumps as 2355 lines.  For what it's worth, my parser reports
   7 AlignmentMorph
   3 BorderedSubpaneDividerMorph
   4 IconicButton
   3 PluggableButtonMorph
   3 PluggableListMorph
   1 PluggableMessageCategoryListMorph
   1 PluggableTextMorph
   2 RectangleMorph
   4 SketchMorph
 366 StringMorph
   1 SystemWindow
   1 TextMorphForEditView
   5 TransformMorph

Before I released it, I'd want to do a bit more tuning.
For example, an IconicButton should probably *not* show its SketchMorph
child; maybe BorderedSubpanelDividerMorphs should pretend they're not
there; maybe TransformMorphs and AlignmentMorphs should also conceal
themselves.  The presence of scroll bars should perhaps be shown as
attributes on the object they control.  And so on.
I'd want to implement a bit more: I've only looked at things that turned
up in a Browser and the 'Welcome to...' window, not at flaps &c.
I'd want to do a wee bit of refactoring, and I'd want to hook it into
the "spanner" halo handle.

But above all, I'd want to fix whatever problem has stopped Celeste
finding my ruddy mail server!!!

The important point is that Squeak is a *really* nice environment for
doing this kind of thing.  I didn't have to understand much about Morphic
to write the code, and I got what _is_ there working quite quickly.
It's already enough to do _some_ kinds of regression testing.



More information about the Squeak-dev mailing list