Support Joomla!
Joomla state of the Unit Test
User Rating: / 3
PoorBest 
Unit Testing
Written by Scot Inscore   

 

I have spent the first few weeks of the 2008 GSOC familiarizing myself with the current state of Unit Testing in Joomla. As you may or may not be aware several attempts have been made to realize the power of Unit Testing in Joomla. The 'old' Unit Test code uses SimpleTest for php. The 'new' Unit Test code is that written using the phpUnit framework. This code can be viewed via SVN at http://joomlacode.org/svn/joomla/testing/branches/2007-12-17 . It is this code that will be most useful for providing a starting point, for my GSOC project.

My examination of the Joomla code base has led to several conclusions. The first is that I need organization before I can even attempt to dive into my project. To this end I have started a wiki to record and organize data on the state of Unit Testing in Joomla classes. This will serve two purposes, the first is to provide a road map for me to see what I have to do and eventually show what I have done. The second purpose will be to provide a resource for people who would like to contribute to Joomla by writing Unit Test code. For more information see: http://docs.joomla.org/Unit_Testing  "Unit Testing road map" will be located at http://docs.joomla.org/Unit_Testing_Status once it is ready.

The next conclusion I reached is that I will not be able to do Unit Testing for all of Joomla by my self. To that end I will be refocusing the efforts of my GSOC project to helping to create a solid foundation for Unit Tests in Joomla as well as the tools and documentation to enable others to contribute Unit Tests. Thus I hope that I can show the benefits of Unit Testing and thus inspire developers to write Unit Tests for the code they work on.

My Final conclusion is that Unit Tests are only helpful if they are run often, thus I have decided to also consider writing a web-based Unit Test runner (currently only command line) This will of course add challenges to my work, and require time that I could otherwise spend writing Unit Tests. I have spoken with some of the Joomla developers who have worked with Unit Testing and all seem to agree that this is a good idea. Of course I welcome any feedback or questions anyone has regarding my project and Joomla Unit Testing in general.

 

Show other articles of this author