I’m arriving to this thread a little later than I had thought. I have
been on a “hidden” alias all day in which only Bruce had access to
me… he forwarded this to me and not even thinking I responded from
this alias which is not registered in the system for this list and as
such a… very… lonnnnnnnnnnggggg… time … later… I was
reminded of this by the SF.net servers.
Anyway, James, in short I created an XSLT test-suite that uses an XML
configuration file that contains a combination of settings to both set
the test files (or portions of a file) as well as create the batch
files that will auto process these files based on a sequence that is
dynamically built, a final batch file created as a “controller” that
will invoke each batch file sequentially, storing the output in
individual files that can then be referenced for verification of
proper output. Its actually probably easier to understand if you look
at the actual code base so heres a link to a zip of the most recent
updates I made to it a few days ago to compare Saxon and Saxon.NET
output.
link > http://66.93.224.14/~mdavid/test-suite/xslt-test-suite.zip
A slightly outdated explanation of the test suite can be found on my blog
link > http://www.xsltblog.com/archives/2005/01/idea_for_usage.html
In reality the explanation was more of a side effect of a sudden
realization I had for how some points Dimitre was making on XSL-List
could be used in a real world situation, but this gives the general
idea of how the test suite works. Keep in mind that I wrote this in
about a 1 hour block of time + some extended wait time while I
searched for a way to get the commanline message output of Saxon into
a stream and saved to a file. None-the-less I knew I was using
shortcuts that would need to be updated at a later date so this code
is in no way optimized nor does it contain even a small portion of the
functionality it could contain. This project will be a nice way to
use a real world test need to expand the code base appropriately.
Also, the current state of the suite is designed to compare two
different stylesheets and the output they produce, in the time it took
to produce it. It was original thrown together to compare a challenge
to the Muenchian Method of grouping so that it could be quickly
showcased that in fact the challenge was only plausible at a very
superficial level and when used against extensive amounts of data that
needed to be grouped the MM was clearly the winner as we all new it
would be. Still, the resulting suite, slightly modified and enhanced
would allow an extensive library of test files to be run against a
series of output definitions and then used to further verify the
correct output is recieved.
Something just occured to me that would make this web service sample I
just built (still working on a few things and as soon as they are
finished I will shoot you a link) something more than just a sample.
I can set it up such that anyone can submit a test file via a web
form, defining a test sequence to be run against it, returning the
results in either the Response stream or zipped up in a package and
the link returned to the browser via a Response.Redirect such that it
will automatically invoke a download of these files… The other
possibility (and probably even better now that I think about it) would
be to create a custom report page with links to each individual file
for viewing online, with a link to download the files in a zip file if
desired.
Anyway, see if the downloaded files make sense as to whats taking
place. I will take a few minutes now to update this to enable
processing of a library of test files to be output using a series of
defined outputs. We can then turn that into a web service and you all
can coach me on how to make it something that will be truly useful to
the community to begin running tests against and as such contributing
another test file to the system such that it will help us further
understand the usage patterns of the user base which will aid in
further optimizations as well as the future creation of features,
etc…
Back soon with the update…