Re: RFC: Gtk+ testing utilities

On Sat, 17 Nov 2007, Stefan Kost wrote:


Tim Janik schrieb:
hey All.

first, a quick update on the GLib testing framework. allmost all of it
has been implemented at this point and is available here:;a=shortlog;h=gtester2
we're currently working on finishing the documentation. and now that glib
has been branched, we'll look into integrating it into upstream next week.

below is the proposed API for Gtk+ testing utility functions.
they are mostly derived from the needs to automate user interaction
tests of dialogs and widgets.
a myriad of other functions could of course also be useful for testing,
but those are probably best found out and added to Gtk+ as time passes
and specific needs arise.
this basic set should be good enough to navigate and operate most
dialogs programatically.
the following is just a very brief API wrap up, attached is a Gtk+ program
that implements and documents this API and has a bunch of example
test cases to test this API. the attached test program is not yet dependant
on the new glib testing framework, so it's easier for people to try out.

What about Xvfb support? I have 4 funtions in buzztards check test suite:

i've setup a similar environment, albeit in the Makefile:;a=blob;f=gtk/tests/;hb=72227f8f808a0343cb420f09ca480fc1847b6601
hardcoding Xvfb invokation in the executable doesn't seem very fortunate
to me. e.g. depending on the system, you might want to use Xvfb, Xnest,
Xephyr, etc or for debugging the X server of the current session.
also, running Xvfb from the makefile will allow to share Xvbf invocations
between multiple test programs.

the logic from the makefile might be useful to factor out into a script
for other GUI projects though, since it involved quite some tweaking to
handle missing Xvfb gracefully, find free display ids and provide meaningful
error messages on errors.



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