I've begun using perl's Test modules to do some unit testing on our code
and regression testing on some of our web applications.

Specificially, I'm using Test::More and prove. 

However, I have some questions that aren't really addressed by the
documentation I've found thus far.  These are basic questions, so I'm
positive there are some general answers (or at least general practices).

Currently I have a directory tree, and my testing consists of running
prove on one .t file, a directory, or recursively over all.  I don't
seem to have a means of controlling the order of tests without using the
shell.  (i.e. "prove" will run the tests in whatever order it pleases.
"prove *" will run them in asciibetical order)  Is that true?

There are some tests that I would love to have abort as soon as they
fail. (If step 3 failed, then steps 4 and 5 are places I don't want to
go)  Is there a way to make prove do this?  I skimmed the
Test::Builder docs, in case I was going to have to roll my own
prove-like tool, and didn't see an obvious call there either.

I have some related tests.  For example, to test the account management
of our LDAP administration tools on the website, I have a test to create
an account, test various edit options, then delete the account.  (This
is testing the create and delete as well, so I don't want to use an
existing account).  This means that I either write a very large,
monolithic .t file which reduces my ability to testing single functions
of the interface, or I write separate .t files for each function.  In
the latter case, I have to either be sure to run the create in the
beginning and the delete at the end (see prove and order of tests at the
start of this email) or I have to copy the create and delete code into
each tests, making maintenance harder.  Is there a common way to
modularize code in test files?  Is this just a "do" call?

Thanks in advance!

-- 
SwiftOne  /  Brett Sanger
[EMAIL PROTECTED]   

Reply via email to