Changes between Version 4 and Version 5 of BluePrint/XsltTesting
- Timestamp:
- 06/06/14 11:10:45 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BluePrint/XsltTesting
v4 v5 15 15 The transformed file will need to be compared against the golden file. Options for performing the comparison: 16 16 17 * For XML output, read both the transformed file and the golden file into an etree, and compare the etrees.17 * For XML output, read both the transformed file and the golden file into etrees, and compare those. 18 18 19 * For S3XML output, read both using S3XML utilities .19 * For S3XML output, read both using S3XML utilities and compare the S3XML trees. 20 20 21 * Direct textual comparison: This 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, or for output formats that are not XML. 21 * For other formats, compare the files as strings. 22 23 String 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. 22 24 The test helper can run as a Python unit test, under control of eden/modules/unit_tests/suite.py. In case people would like to add tests for other code under eden/static, we can follow the eden/static directory structure. That is, tests for stylesheets could be placed in eden/modules/unit_tests/static/formats so that, for instance, if people later want to write tests for tools, those could be placed in eden/modules/unit_tests/static/scripts/tools.