Monday, May 22. 2006Finally used PHPUnit and I like itTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Hello !
I just wanted to let you know that, if interested, i'll be very pleased to hear if you like the testing class I developed following the TAP format but adding HTML reporting and code coverage using the wonderful XDebug. A first alpha is available at http://logicoder.bountysource.com
Can you elaborate on the reasons for ditching simpletest? I'm in the process of evaluating PHP unit test frameworks myself, and it seems simpletest has the advantage of a web test framework (albeit a simple one). It also has mock objects, so no win for PHPUnit there.
Well, just to clear up one thing really quick, PHPUnit 3 does have mock objects and most releases to date have been very stable. I have now used PHPUnit for the better part of 2 months with no problems. Zend framework has also just announced that they will be using phpunit3 for their unit tests. So even though it is in an alpha stage it can be considered excellent software.
So, mock objects aren't a problem. As far as web testing, there are other options, the one I currently use is Selenium. However, you can also use the SimpleBrowser object directly with PHPUnit if you so desire. Lastly, (and this can't be depended on) I have began work on a web testing framework that is fully integrated with PHPUnit. Now, as for the reasons I chose to use PHPUnit. There are two really big reasons. The first (and most important) reason is that the style that PHPUnit 3 is written and the API that it reveals perfectly fits my style. This is just a matter of preference but it is important to use tools you can be comfortable with. The second reason is that I really wanted a testing framework that supports code coverage, which works like a charm in PHPUnit 3. Another thing to look at is how active phpunit development is compared to simpletest. Now this isn't a hge deal because SimpleTest does what it does, does it well, and doesn't absolutely NEED any other functionality. However it hasn' seen a new release for quite some time. PHPUnit on the otherhand is on the verge of a 3.0 release and has alot of community users and a very responsive project lead when it comes to new features. (Please note this is nothing against Marcus B. It's just a fact of life that some have more time to develop OSS than others. Marcus is a top-notch developer that created an excellent testing suite.) |
Paying for the Site
QuicksearchCategoriesArchivesDaily ReadsThe PHP WTF Sebastian Bergmann Wez Furlong Tom Sommer Tobias Schlitt Chris Shiflett Ben Ramsey adam trachtenberg Sklar george schlossnagle Dynamically Typed (Harry Fuecks) John Coggeshall John Lim Marco Tabini PHP Application Tools Planet PHP PHPCommunity.org |

