|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: ANN: 'Testing XSLT' training course PDF available
On Mon, Dec 17 2007 11:55:55 +0000, andrew.j.welch@xxxxxxxxx wrote: > On 17/12/2007, Tony Graham <Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx> wrote: >> On Fri, Dec 14 2007 12:31:37 +0000, andrew.j.welch@xxxxxxxxx wrote: >> ... >> > You mention black box testing under the unit test heading... which >> > doesn't quite fit. >> > >> > Personally I don't think you can unit test XSLT*, it's only really >> > worthwhile to test the output for a given set of inputs. >> >> Which is the sense in which I used "black box". > > It's not "unit testing" then... surely? I didn't say that it was unit testing, I said that you could use one of the XSLT unit testing frameworks (among other tools) to do it, since many of the frameworks explicitly support it: If you want to test the stylesheet as a whole, the easiest thing to do is to create external input/output files and reference them. [1][5] XSLT transformation test case. This is achieved by passing the contents of the <utfx:source> fragment through the XSLT stylesheet that is being tested and asserting that the result is the same as the contents of the <utfx:expected> fragment. [2] Knowing the input XML, input stylesheet and expected output XML we can assert that the output of the transformation matches the expected output as follows [3] Often template requires current node to be set up. By default, it is a root node of the input document... [4] Regards, Tony Graham. ====================================================================== Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx http://www.menteithconsulting.com Menteith Consulting Ltd Registered in Ireland - No. 428599 Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland ---------------------------------------------------------------------- Menteith Consulting -- Understanding how markup works ====================================================================== [1] http://www.jenitennison.com/xslt/utilities/unit-testing/ [2] http://utf-x.sourceforge.net/manual/manual.html [3] http://xmlunit.sourceforge.net/userguide/html/index.html [4] http://juxy.tigris.org/ [5] http://tennison-tests.sourceforge.net/tests.html
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








