Re: RFC: Gtk+ testing utilities

Tim Janik schrieb:
> On Sat, 17 Nov 2007, Stefan Kost wrote:
>> Hi,
>> 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:
>>> 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:
> 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.
I was thinking the same and actually started from make too. My configure checks
fro Xvfb. Although I never thought about the alternatives you mention - good
idea! I've been using code because its a bit easier to check for the free
display and also cleanup. And my code reuses the Xvfb instance, therefore the
separate server and display code. For the future I was planning to run with
different themes and/or different locales (later is good for docs).

> 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.

Yep, My code had to pass several revision to mature. E.g. its good to cleanup
dead display and lock files. While looking at your code, it seems you use
display ids ranging from 101-199, is that right (did not know this would work).
>> Stefan
> ---
> ciaoTJ


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