Unit testing Using XML/XSLT for Test harness Generation

This forum is for reporting bugs in Joomla!. Please don't report problems with extensions in here.
Locked
RayU65
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Jan 16, 2008 9:58 am
Location: Winchester, England

Unit testing Using XML/XSLT for Test harness Generation

Post by RayU65 » Sun Sep 14, 2008 7:04 am

While checking on Joomla! latest updates. I noticed that Unit Testing efforts are getting going. I thought It a good idea to share my resent university project with you in the hope that it helps.

I chose for my project to investigate the separation of unit test data from the test harness used to run it. To do this I proposed using XML to structure and present the Unit test data and then used XSLT to generate the unit test harness. For my project I used Joomla! 1.5 as my web site shell and wrote my project as a component. Given the time available and my total lack of Joomla! experience at the time the project is very basic but did prove the point that writing XML unit tests can be done.

What does this give you? Test harness language/Framework independence. define your unit tests in XML using an XSD to validate and then write an XSLT transform to generate the test harness. This way you only need to redefine the test harness generation and don't need to rewrite unit tests if the Framework changes or the language!

This could be implemented for Joomla! using an editor to write XML directly to start with. Xalan and Xerces to process the XML & XSLT

If anyone is interested in this I can submit my basic XML unit test example and XSD and PHP XSLT files (if someone tells me where to send them)

regards
Ray U

User avatar
ircmaxell
Joomla! Ace
Joomla! Ace
Posts: 1926
Joined: Thu Nov 10, 2005 3:10 am
Location: New Jersey, USA
Contact:

Re: Unit testing Using XML/XSLT for Test harness Generation

Post by ircmaxell » Sun Sep 14, 2008 2:48 pm

Upload the zip here... I'm curious to see how you defined the logic... :-)
Anthony Ferrara - Core Team - Development Coordinator - Bug Squad - JSST

http://moovum.com/ - The Bird is in the air! Get Mollom Anti-Spam on your Joomla! website with Moovur...
http://www.joomlaperformance.com For All Your Joomla Performance Needs

RayU65
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Jan 16, 2008 9:58 am
Location: Winchester, England

Re: Unit testing Using XML/XSLT for Test harness Generation

Post by RayU65 » Sun Sep 14, 2008 8:17 pm

Ok sorry only got time tonight for the bare bones. Hope it's enough.

Regards
You do not have the required permissions to view the files attached to this post.
Ray U


Locked

Return to “Joomla! 1.5 Bug Reporting”