Testing reports

Colin Scott gnucash at double-bars.net
Tue Mar 27 18:51:00 EDT 2012


> Colin, I am sorry that the report formatting changed between 2.2 and
> 2.4.  Some of this probably happened because of the move from 
> GtkHTML -> WebKit which enabled CSS, and many reports were updated
> to support CSS instead of the old weird stylesheet stuff.  GnuCash
> is still in flux, there, and I expect that the swap to WebKit might
> complete in 2.6  (but I'm not sure).  

Thanks for that.  Perhaps I should make clear that my gripe was not that the reports changed /per se/.  My concerns relate the nature of the changes.  As I have said, he unannounced removal of long-standing functionality is not good, and the introduction of inconsistencies between the options and the output is just sloppy.  My biggest beef, though, was apparently irratioal and inconsistent changes to the way output is formatted - that is, not changes to the appearance, but changes to how that appearance is achieved.

I, in common with a number of other gnucash users, import the output from reports into Excel.  Before the changes, the column layont in Excel always matched the column layout as displayed or printed by gnucash - I assume this was achieved by the use of a column-break or tab character (sorry, I never got around to studying the HTML!  :-) After the changes, a number of fields found themselves in different columns depending on whether the report was viewed in Excel or natively.  It appears that in some cases the column break was removed and replaced with a number of non-breaking spaces.  This meant that I not only needed to find some automatic way of adjusting the columns, but I also had to remove non-breaking space characters from several columns.  It all works now, though the Basic code needed to achieve it is slow, and I'd guess is susceptible to being broken by further changes, and it was one helluva hassle actually writing it.


> I think it's unreasonable to
> assume that a report will *look* the same across all versions and
> never change across application version changes.

Agreed.

> However you are
> right that if we had a test harness we might have caught reports
> that failed to report the correct numbers when e.g. accounts were
> closed.

I have to say that I have never knowingly encountered such a report.  Whatever other gripes I may have, I have always found the basics, in terms of managing the numbers, completely reliable.

> So let's make some forward progress here.  Colin, can you help us 
> get a test harness in place that will test a report for its content?  
> Clearly it means we would need some test fixtures, and some way to
> run a report and gleam the HTML output for testing.  Can you help us
> here?

I must reluctantly decline, though I have volunteered elsewhere in this thread to contribute in other ways.  I will also be happy to explain to someone, to the best of my recollection, what my test-rig did and how it did it.

Colin Scott


More information about the gnucash-user mailing list