Phlip wrote:

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


Can you suggest a structure of tests for testing insert, select and delete operations? I suppose that I can write something like tis:


sub test_001_insert {
... insert record and do some tets
}

sub test_002_select {
... select record inserted in previous test and do some tets
}

sub test_003_delete {
... delete the above  record and do some tets
}

--
Dmitry.



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Perlunit-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/perlunit-users

Reply via email to