Some of the literature on testing databases suggests a setup() and a teardown() method before each set of tests. That way, you'll have a known state at each batch. Make sure that the state is restored even if a test crashes.
I'd probably do that instead of the transaction approach. It's clever, but if you need to test something that itself requires a transaction, it's tricky.
In reply to Re: Using Test::More to unit test T-SQL
by chromatic
in thread Using Test::More to unit test T-SQL
by jplindstrom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |