Short explanation of how to use the unittests?

John Ralls jralls at
Sat Mar 23 10:09:10 EDT 2013

On Mar 22, 2013, at 3:15 PM, Christian Stimming <christian at> wrote:

> Hi John,
> I just tried to do some test-driven development in gnucash. However, I 
> couldn't find some short or easy explanation on how to actually work with the 
> unittest framework that we're using. 
> For example, I can see a failing test in libqof, "/qof/gnc-date/qof print date 
> dmy buff", and now I want to see the verbose output of that particular test to 
> know which of the asserts are failing. There must be some env variable magic 
> or similar things to switch on the stdout output. Where can I read about that?
> Could you please add a (short) wiki page in the gnucash wiki to answer a 
> question like that? Alternatively, a similar first explanation could be added 
> either to the README or the HACKING text document (or a pointer to such a 
> document), but I couldn't find either. There must have been an explanation 
> somewhere. Alas, it is not possible to find it...


The short answer is that Glib testing is documented here:

When you run e.g. test-qof you're really running gtester.

There's already a testing page in the wiki,, but it is a bit terse and has only the first link. I'll add a section on running tests with the other two.

John Ralls

More information about the gnucash-devel mailing list