spam,Re: Testing reports

Derek Atkins warlord at MIT.EDU
Tue Apr 10 13:52:45 EDT 2012


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