Re: [Perlunit-users] Using @TESTS for changing tests execution order
Status: Beta
Brought to you by:
mca1001
From: Phlip <pl...@sy...> - 2003-10-13 21:17:28
|
> Suppose that one test is for database INSERT statement, and the other -- > for SELECT, and that last -- for DELETE. That way I need to maintain the > order of tests execution. Of course, I can put all operations into one > test instead. Uh, one common trick here is to put into setUp() a BEGIN TRANSACTION, then put into tearDown a ROLLBACK. But it sounds like you should randomize the order of your tests. Unless you are testing quite crufty legacy code, where you must rely on a certain amount of setUp before testing everything, your tests should all be totally severable. When you achieve that, come back to me and tell me how you did it. ;-) -- Phlip http://www.c2.com/cgi/wiki?TestFirstUserInterfaces |