limb/tests_runner-0.8.7 released!

I’m glad to announce the new release of the limb/tests_runner package which reached 0.8.7-beta version! This package ships with limb_unit - a SimpleTest tests “swiss army knife” console based runner. If you’d like to know more about limb_unit utility I would highly recommend reading its documentation since it provides quite unique features like nested fixtures, code coverage and so on(documentation it’s actual for 0.8.5-beta as of this writing, but that’s ok).

This release introduces some unique filtering features which can be quite useful for large sets of tests. Now it’s possible to use filters for the following entities:

  • test classes
  • test classes’ methods
  • test classes’ PHPDoc @group annotation tags

In the rest of this post I’ll describe these new features in detail.

Test classes filtering makes it possible to execute only those test classes which match the passed filter. The shell command below:

$ limb_unit -T Foo,Bar test.php

…should run only Foo and Bar test classes found among others in test.php file.

Test methods filtering allows you to run only those test methods which match the passed filter. For example, the following command:

$ limb_unit -M testFoo,testBar test.php

..will execute only testFoo and testBar test methods omitting the rest ones found in all test cases in test.php file.

Annotation @group tag filter allows you to execute only those test cases which have some specific @group annotation tags. For example, running the following command:

$ limb_unit -G db,auth test1.php test2.php

…will yield executing only those test cases from test1.php and test2.php files which have @group annotation tag matching “db,auth” filter, e.g:

/**
 * @group db
 */
 class MyTest1 extends UnitTestCase
...
/**
 * @group auth,db
 */
 class MyTest2 extends UnitTestCase
...

I’m also thinking about adding more nice features into filters. Some of them are not “!” operator(e.g. -T !Foo,Bar) support and simple patterns support(e.g. -M testDb*). Stay tuned! ;)

limb/test_runner package can be installed via Limb pear channel using these shell commands:

# pear channel-discover pear.limb-project.com
# pear install limb/tests_runner-beta

One Response to “limb/tests_runner-0.8.7 released!”

  1. My desperate life quest for efficiency » Blog Archive » Limb3 2007.4(Frozzy) Released! Says:

    […] point of interest is the stable release of limb/tests_runner-1.0.0(I blogged about limb/tests_runner-0.8.7 before and the new one is mostly a version bump). It introduced different test entities filters and fixed […]

Leave a Reply