J.Pietschmann wrote:
> Bertrand Delacretaz wrote:
> > However, this requires measurable tests of one's success.
> > Automated tests would be hard to implement for FOP I think
>
> I think so. There are however a few interesting approaches.
...
> A slightly more advanced idea is to render the PDF page(s) into
> standarized bitmap(s), then use a tool providing fuzzy bitmap
> matches to compare with an expected result. This could check
> whether a 30pt text comes really out at 30pt but should be
> somewhat tolerant of many kinds of small changes in the layout
> algogorithm. Anybody taking the task for tracking down useful
> tools and providing a proof of concept?
There is already supposedly in place a system for using a reference jar file
to generate XML output of the area tree & compare it to such output from the
code being tested. I haven't ever tried to use it, but I thought that was a
pretty good approach. Of course, in a development stage, keeping a useful
reference jar would be a big job, but I guess that would be true of any of
the other approaches as well. The writeup needs some work, but is at:
http://xml.apache.org/fop/dev/testing.html
Victor Mote
|