Testing reports

Colin Scott gnucash at double-bars.net
Wed Apr 11 08:06:00 EDT 2012


> I would argue that the contents of the report are more important 
> than the formatting, at least in the context of how this thread
> started.

Hmmmmm.  I'm not at all sure that I agree.  *WHY* would the report formatting change?

The fundamental point here is that even if the change is harmless it should only occur as the result of a specific and specifically intended action - anything else must be a bug!!!  Either way, any change in the output should be flagged, either so it may be certified as correct (and then incorporated into the standard against which subseqent tests will be made) or so the cause of the change can be tracked down and fixed.

There are no circumstances I can envisage where it is proper to ignore *any* change to the output.

Colin

-------- Original Message --------

*Subject:* spam,Spam:****, Re: spam,Re: Testing reports
*From:* Derek Atkins <warlord at MIT.EDU>
*To:* Colin Law <clanlaw at googlemail.com>
*CC:* gnucash at double-bars.net, gnucash-user at gnucash.org
*Date:* Tue, 10 Apr 2012 13:52:45 -0400

Colin Law <clanlaw at googlemail.com> writes:

> It is a bit of a philosophical point really, but one could argue that
> the output from the software is a report rather than a chunk of html.
> What matters is what the report looks like, and if the Document Object
> Model has not changed then it will look the same whatever the details
> of the underlying html.  Using the DOM allows the test to relate to
> the end result, with tests such as "there should be a paragraph of a
> particular class containing particular text", rather then "there
> should be a string of the form <p class =......".

I would argue that the contents of the report are more important than
the formatting, at least in the context of how this thread started.
It's important to see that a foo report on a data file would report that
the balance of account X is $y.zz at date 1, and that after operation O
occurs, the balance of that same account is $a.bb (which may be the same
as y.zz).

> I don't know how the html is generated in the code, if it uses an html
> library (or if at some point in the future it used an html library)
> then another issue could be that a newer version of the library might,
> for example, change the order of attributes in a tag.  A DOM based
> test would not care about this but for a text based one it would be a
> disaster.

It's done using a standalone scheme generator.

> Colin

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-user mailing list