|
Unit Testing
|
|
Written by Scot Inscore
|
|
Today I wrote 3 new unit tests for JArrayHelper, and there was much rejoicing. Now with my first milestone finished, and my project progressing smoothly I feel that I am back on track. I hope to be able to continue my success and write many more unit tests before the summer is done.
|
|
Unit Testing
|
|
Written by Scot Inscore
|
|
Thanks to a utility developed by Alan Langford, a clear map of the status of Joomla Unit Testing now exists. It can be viewed on the Unit Testing wiki status page. Thus I have been able to complete the first milestone in my GSOC project, organization and familiarization.
When I first started I must admit that the state of unit testing in J! was so chaotic, and simply so much to keep track of that it was scary. Initially I began by working with the *wrong* Unit Testing code, that is the old SimpleTest code, which resulted in much confusion.
The current Unit Testing code has been relocated to a single SVN location: http://joomlacode.org/svn/joomla/testing/trunk
Now I begin the second stage of my project, writing Unit Tests!
|
|
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. |
|
Unit Testing
|
|
Written by Amy Stephen
|
|

Scot Inscore is a Junior at the University of Wisconsin - Whitewater studying Management Computer Systems. He has worked with computers since the age of seven and marvels at advancements including how today's handheld devices are more powerful than the desktop computers with which he started. Scot has experience in many languages including PHP, Basic, VB, Java, Perl, Assembler, and SQL. He has experience with several OSCMS's, including Joomla!, Drupal, and WordPress. Scot is interested in multimedia and experienced with Blender.
Mentor: Dr. John Chenoweth is an associate professor and chair of the Department of Information Technology and Business Education at the University of Wisconsin - Whitewater. John has been involved in web design and development for 15 years. Recent sites have been created with Joomla!. He also co-manages the Wisconsin Center for IT Services at UW-Whitewater, which specializes in providing open source solutions to regional businesses.
|
|
Unit Testing
|
|
Written by Scot Inscore
|
|
Unit Testing allows developers to test that a unit of code still functions properly after a change. Currently Unit Testing in Joomla is being switched to the PHPUnit framework, however most code lacks any Unit Testing. A few of the major benefits for Joomla from Unit Testing include:
- Highlight cases where minor changes cause unexpected breakage.
- Specify how a class should behave.
- Expose design flaws early in development.
- Serve as examples, and help developers understand how to use code as well as what the code is expected to do
|
|
|
|
|