Re: Unit testing Gtk+ applications
- From: Stefan Kost <kost imn htwk-leipzig de>
- To: Tristan Van Berkom <tristan van berkom gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Unit testing Gtk+ applications
- Date: Tue, 16 Nov 2004 16:25:38 +0100
Hi Tristan,
we are using check as well. And currently we test the gobjects that represent
data-structure and logic.
There are in-fact two reason why I would like to try to remote control my gtk
app. Beware it is just a wild idea! I would like to save dialogs as png images
while iterating over the application. I could compare the images, just to signal
that something has changed (which not neccesarilly is an error). On the other
hand these images can go straigh to the documentation folder (always having
up-to-date doc-images).
I know that testing a GUI app more or less boils down to the question what one
really wants to test. For us going over a series of selected scenarios, that
involve showing all the dialogs in the application would be already a good
thing. It increases confidence that the application will work ;-)
So to others: How do you approach that?
Stefan
Tristan Van Berkom wrote:
On Tue, 16 Nov 2004 13:25:59 +0100, Stefan Kost
<kost imn htwk-leipzig de> wrote:
hi hi,
to avoid reinventing just another wheel - can anyone point me to projects using
unit tests for a gtk+ based UI. Something like using the application without
gtk_main(), injecting own events and driving the event-loop via
gtk_main_iteration_do().
I use check (check.sf.net) unit test framework for any lower level modules
(anything "unit testable") and only functional tests for GUI stuff (i.e. all my
custom widgets always come with a functional test program).
I've found that main-loop or no main-loop, I've been able to run unit tests
(i.e. some functions I'm unit testing are "meant to integrate into the
GMainloop"),
it really comes down to, "How does your unit test program know to fail if
your animator is displaying garbled data on the screen or is not showing up
at all ?" kind of UI situations that AFAICS are simply not unit testable.
Cheers,
-Tristan
--
\|/ Stefan Kost
<@ @> private business
+-oOO-(_)-OOo------------------------------------------------------ - - - - -
| __ Address Simildenstr. 5 HTWK Leipzig, Fb IMN, Postfach 301166
| /// 04277 Leipzig 04251 Leipzig
| __ /// Germany Germany
| \\\/// Phone +49341 2253538 +49341 30766101
| \__/ EMail st_kost_at_gmx.net kost_at_imn.htwk-leipzig.de
| WWW www.sonicpulse.de www.imn.htwk-leipzig.de/~kost/about.html
===-=-=--=---=---------------------------------- - - - - -
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]