Hello,

I'm in the process of switching over to Test::Class and prove, after naively inventing my own versions of these. :)

One feature I had with my solution was command-line switches to choose which classes and methods to run. For example,

    runtests.pl -t Session -m basic

This would run any method matching "basic" in any test classes matching "Session". Often I used this just to test a single class and method, but it was really nice to be able to type a small piece of the name.

AFAICT, the way I would to this with Test::Class and prove is:

* Set the TEST_METHOD environment variable.
* Pass a classname to prove, as outlined in the Test::Class::Load documentation (e.g. "prove -lv -It/tests Some::Test::Class"). I really don't understand how this works, since the prove documentation mentions nothing about taking classnames as arguments; and in any case this doesn't allow regexes.

I'm wondering if any Test::Class (or Test::Unit, etc.) users out there have yearned for a more convenient way to specify which classes and methods to run, and if there's any reasonable way to add this capability to prove, given that the options would make no sense for traditional non-class tests.

Thanks,
Jon

Reply via email to