xmlroff Testing Module
This module serves multiple purposes for the xmlroff XSL formatter:
- Comparing results between different versions of xmlroff
- Comparing results between xmlroff’s different output formats
- Comparing xmlroff output to files produced another way, e.g., from a different formatter – FO or otherwise
The testing module uses a combination of Makefile, Perl, and commonly available utilities to:
- Run an XSL formatter on one or more test suites conforming to the format originally defined by the W3C XSL FO subgroup for XSL 1.0 Candidate Recommendation testing. The test definition for a single test is shown below:
<test id="expression1" fo="multiple" xml="inherited-property-value.fo" results="inherited-property-value.pdf">Use inherited-property-value() in expressions for font-size property, including using function with property other than font-size and using as part of a larger expression.</test>
- Rasterise the PDF or PostScript output
- Compare the rasterised output against a reference
- Produce a report summarising all tests and an individual report for each test

Figure 1 – xmlroff test summary report

Figure 2 – xmlroff individual test report (click on figure to view full-size)
- Produce a “stereo” image combining the result and reference for any page that is different from its reference version

Figure 3 – Detail of “stereo” comparison, where the red channel is from the current result and the blue channel is from the reference
When the reports are served by a web server, the record of the test results – which also conforms to the format defined by the W3C XSL FO subgroup – can be updated to indicate whether the result agrees with the expected result or to add a comment about the test result. The test result for the example is shown below:
<testresult id="expression1" results="expression1.pdf" agreement="full" specproblem="no" testproblem="no"/>
The testing module also includes utilities to convert DocBook test documents and FOP layout engine tests to W3C format testsuites.
Attachments
-
testing-report.png
(35.3 KB) - added by tkg
18 months ago.
xmlroff summary report.
-
individual-report.png
(92.9 KB) - added by tkg
18 months ago.
xmlroff individual report.
-
stereo-detail.png
(16.8 KB) - added by tkg
18 months ago.
Stereo detail.
