GTK program testing



Hi there, GTK fans!

I'm considering developing a GTK testing function that would 
"stress" a GUI by sending signals to widgets at random, to 
try to detect combinations of events that lead to an error or 
inconsistent state.  The signals would simulate actions that 
could be performed by users (e.g. button presses, entering of 
text into entry widgets, selection of clist entries, etc).  I 
have some questions that the GTK community can probably help 
me with:

* Does such a thing already exist?  I seem to remember seeing 
some related functions at GDK level to record/playback 
events, but they seem to have gone away in recent versions of 
GTK.

* How difficult would it be?  I envisage having a timer/idle 
function running which scans the widget hierarchy (getting 
all the toplevel windows from gtk_container_get_toplevels()) 
and selecting an "appropriate" widget at random to signal 
("appropriate" meaning a widget that the user could normally 
interact with -- i.e. visible, active, etc).  Would there 
need to be code for each widget type, or can signalling be 
made more generic?

* How useful would it be?  I think there would have to be 
some way of recording/playing back the signals that led up to 
a failure, or tracking down bugs might be difficult.

I'm sure there are lots more problems I haven't thought of.  
But what are they?

Glenn





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]