[Patch] Bug 712640: gnc-engine.c parallel optimization

John Ralls jralls at ceridwen.us
Tue Nov 19 16:45:42 EST 2013


On Nov 19, 2013, at 11:43 AM, Geert Janssens <janssens-geert at telenet.be> wrote:

> On Tuesday 19 November 2013 16:21:44 Alex Kempster wrote:
>> Hi Geert,
>> 
>> Thank you very much for the feedback, i am just cautious about
>> stepping on toes!
>> 
>> I have made the wiki changes as you have suggested. I will have a
>> think on the best way to guide a newcomer through and try to draft
>> something up over the next week or so.
>> 
>> I will also do some research into unit testing to see if this is
>> something i could tackle, is there any particular unit that you would
>> recommend to start with or should i just pick a small unit and try it
>> out?
> 
> The engine and qof are the two libraries that need unit testing the most. Both modules have a 
> number of unit tests already, but many parts are not covered yet.
> 
> You can check which unit tests are available in
> src/engine/test and src/libqof/qof/test.
> 
> You can pick any part that is not covered yet in these tests and see if you can write unit tests 
> for these.
> 
> Good luck !
> 

QOF is actually pretty well covered already, but there’s plenty to work on in src/engine.

Be sure to read http://wiki.gnucash.org/wiki/Testing . There’s a StackOverflow article here
http://stackoverflow.com/questions/504737/best-unit-test-tutorials-for-beginners
that lists several “beginning unit-testing” books. Mind 1) that some of the Gnucash classes are rather
impervious to testing and 2) that we’ve departed a bit from the “best practice” of writing a
separate function for each assert in the interest of getting more coverage in a hurry. I’ve found
the strategies in http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052
very helpful in figuring out how to test spaghetti functions, but like all CS books, it’s expensive.
 There’s an executive summary at
http://www.objectmentor.com/resources/articles/WorkingEffectivelyWithLegacyCode.pdf
that you might find useful.

When you’re ready (and have the money), http://www.amazon.com/xUnit-Test-Patterns-Refactoring-Code/dp/0131495054
is the reference to get and keep handy. 




More information about the gnucash-devel mailing list