|
RunningScenarios
How to test whether your stylesheet meets its description
Phase-Deploy Currently, to run the tests, the XSpec description document is transformed into an XSLT stylesheet which imports the stylesheet being tested. Running this stylesheet results in an XML document that holds the results, which is then transformed into an HTML report. The two stylesheets involved in this process are:
Two scripts are provided that will perform this pipeline for you:
Note that you will have to edit each script to match the location of Saxon on your system. To run the batch/bash scripts, use the command line: > xspec filename Two alternative scripts are also provided:
> ant -Dxspec.xml=filename Also see RunningWithAnt.
> java com.xmlcalabash.drivers.Main -i source=filename xspec.xpl You can also integrate XSpec into Oxygen. If you develop more scripts, please share them. |
► Sign in to add a comment
Obviously, a simple XSpec example document that demonstrates the main features would help a lot in understanding. (Or even a more elaborate one - how about testing generate-xspec-tests.xsl with XSpec?)
Are there plans to integrate this with JUnit like "Tennison Tests" does?
Hi,and thanks for a great test framework! I've been looking for a good way to test my xslt 2.0 stylesheets and this works like a charm.
Are there any plans to provide a maven2 plugin to run these tests automatically during a build?
Hi, thanks! I personally do not have such plans, maybe others. Actually I do not really know Maven, so I am not sure how generally useful that would be. But we'd be glad to add a link in the documentation to any work done by someone else. By the way, I suggest to use the mailing list for any discussion, following the comments is quite difficult.