Changes between Version 8 and Version 9 of BluePrint/XsltTesting


Ignore:
Timestamp:
06/06/14 11:34:20 (11 years ago)
Author:
Pat Tressel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrint/XsltTesting

    v8 v9  
    2121The transformed file will need to be compared against the golden file.  Options for performing the comparison:
    2222
    23 * For XML output, read both the transformed file and the golden file into etrees, and compare those.
     23* For XML output, transform the input file, which will yield an etree.  Read the golden file into an etree as well.  Then compare the etrees.
    2424
    2525* For S3XML output, read both using S3XML utilities and compare the S3XML trees.
    2626
    27 * For other formats, compare the files as strings.
     27* For other formats, transform the input, then convert it to a string.  Read in the golden file and do a textual comparison.
    2828
    2929String comparison is fragile, as alterations in whitespace or change in ordering of elements (where that change is not significant to the meaning) will break the test.  However, this is simple, and may be appropriate for getting started, even for formats that produce XML or S3XML.
    3030
     31This can be made less fragile by ignoring whitespace and similar differences where they are not significant -- the user can be allowed to specify what can be ignored.
     32
    3133* Allow the user to provide a comparison function.
    3234
     35This goes against the purpose of making testing easy, so should be avoided.  If this becomes necessary, the user can be allowed to specify the function in the options.  These comparison functions could be added to the test helper, or placed in other files in the same directory.
    3336This goes against the purpose of making testing easy, so should be avoided.