Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 18729 invoked by uid 500); 29 Aug 2002 13:48:54 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 18718 invoked from network); 29 Aug 2002 13:48:54 -0000 Reply-To: From: "Stephen Ng" To: Subject: RE: Unit testing xslt Date: Thu, 29 Aug 2002 09:48:54 -0400 Message-ID: <06F21F6856B6BF4FADEBF2C3BC2D9923022C58@genoa.lumigent.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 In-Reply-To: <06F21F6856B6BF4FADEBF2C3BC2D99232D67C3@genoa.lumigent.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I have unit tests for all my xslt. I'm not using XSLTUnit (which is a fine program)--in my case, for each xslt file, I have a one or more test input files and corresponding reference files which are the expected result when I run the transform. I use file names/extensions to group them: myScript.xslt myScript.simpleTest.xml myScript.simpleTest.ref myScript.complexTest.xml myScript.complexTest.ref I use a combination of batch jobs and ant scripts to match up the files, run the tests, and compare the results. I don't always do test-first--sometimes it's just easier to test your code inside your app. So what I often do is write the code, test it in the app, and then write the tests. I then back out my change, and run the tests again. The tests should fail--if they don't, I've done something wrong in my test code. I then reintroduce my changes one bit at a time, and make sure sure my tests start to succeed again. I think unit testing xslt's is a great thing. HTH, Steve > -----Original Message----- > From: Robert Leftwich [mailto:robert@leftwich.info] > Sent: Wednesday, August 28, 2002 9:58 PM > To: cocoon-users@xml.apache.org > Subject: Unit testing xslt > > > Given Cocoon's big focus on transforms, I was wondering if > anyone is using > unit tests and/or test-first design when developing their xslt? I'd > appreciate any comments on its effectiveness and what tools > you are using > (XSLTunit for example?). > > Robert > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. > > To unsubscribe, e-mail: > For additional commands, e-mail: > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: