Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Test Technique: Self-removing test data

by CountZero (Bishop)
on Jul 18, 2007 at 21:05 UTC ( #627368=note: print w/replies, xml ) Need Help??

in reply to Test Technique: Self-removing test data

Couldn't you clean-up the database through the use of transactions? Just by failing to commit the changes made to the database (e.g. when the test dies) or expressly rolling-back the changes? Of course not all databases support transactions and if you wish to test something which already uses transactions, you are out of luck.


A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

  • Comment on Re: Test Technique: Self-removing test data

Replies are listed 'Best First'.
Re^2: Test Technique: Self-removing test data
by markjugg (Curate) on Jul 19, 2007 at 01:55 UTC
    No. The test script often drives code which is tested as a black box, so we don't have access to it's internal database connection, and it already uses its internal transactions, too.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://627368]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2023-05-29 16:30 GMT
Find Nodes?
    Voting Booth?

    No recent polls found