Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Test Technique: Self-removing test data

by CountZero (Bishop)
on Jul 18, 2007 at 21:05 UTC ( [id://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.

CountZero

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

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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-03-28 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found