SimpleTest 1.0RC1 is out

SimpleTest, a unit test framework for PHP has reached 1.0RC1. Marcus has a (terse) announcement up here describing changes. This also marks the road to a stable, 1.0 release (although it’s been pretty solid around the mainstream functionality for quite some time now, IMO).

One thing I’ll have to try in due course is comparing SimpleTest’s web testing functionality with similar tools in other languages, such as HTTPUnit. Starting to get the impression that SimpleTest may stand on it’s own as an excellent tool for web testing, even if you’re not using PHP. Now if someone could magicallly produce a PHP extension based on SpiderMonkey

There’s also a chance that SimpleTest may be integrated with a well known PHP IDE. Nothing concrete yet so I’ll keep quiet for the time being but great if it happens.

Anyway, thanks and congratulations to Marcus, who became a father recently, so this is all the more impressive (time management? No time for that!)

Update: by nice coincidence, PHP Magazine have published an article Marcus wrote a little while back, free for all: Coding a Login Box Shouldn’t Hurt – looks at SimpleTest’s web testing features.

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • Jake

    So this is all great, but what is SimpleTest? :-)

  • http://www.phppatterns.com HarryF

    but what is SimpleTest? :-)

    Simple Test is a unit test framework. What that means is it provides tools to help you test your code; more specifically it provides tools for unit testing.

    So I the question is what is unit testing? Made an attempt as explaining a while back here . Marcus has also done an outstanding job with the SimpleTest documentation – it’s really worth taking the time.

  • Saleh

    one thing that I don’t really understand and would appreciate it if you could explain it to me ..
    why would I use unit test frameworks?
    I mean is it used to debug your work and see if it gives the expected results?
    if this is what it does, then I can see the results when the script runs! so why would I waste time to prepare a test unit?!
    if this is not what it does, please tell me :)

  • http://blog.casey-sweat.us/ sweatje

    Saleh,

    Unit testing (and integration/acceptance testing) gives you a safety harness. How often do you go back and check the first things that you coded in the script? Most likely, when you are in a code, var_dump, move on mode, you are only doing a cursory check on the latest feature you are adding. What if this latest addition creates problems with some other part of your code that you are not currently looking at? That is was unit tests are for. Every time you make an addition to your code, you run hundreds or even thousands of checks to make sure you have not broken everything. There is no way you could be productive (or maintain sanity) trying to replicate that yourself.

    HTH