Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Testing?

by mandog (Curate)
on Apr 27, 2002 at 16:21 UTC ( [id://162523]=note: print w/replies, xml ) Need Help??


in reply to Testing?

I think testing is something of a religious experience. You start with faith that it will work, you struggle to learn to pray (test), you fast, you are plagued by doubt and tempted by the devil and eventually your faith is rewarded. (or so I pray)

Part of the XP religion is to build a test for each bug that you find so that in the future you catch the bug in automated testing before production. Right now we are experiencing something of a crisis of faith on this tenet of the religion.

We've caught and fixed a bug, but so we are getting close to the point where we spend more time figuring out a test than we spent either on the original code or on the bug fix. The temptation is to say "screw it, lets move on."

For the curious some (not especially perish) specifics:

Our load.pl file puts test data into our database. Some of our tables have unique columns based on sequences. (a stack of auto incrementing serial numbers). Our test data load did not increment the sequence so when our test users attempted to insert data from the sequence they fail. --The number on top of the sequence is already in the database.

We've figured out how to work around this problem (set nextval of sequence to max of id column in table in question) We're still struggling to find a way to find all the tables with columns based on sequences that have values in those columns greater than the next value of the corresponding sequence. We're probably going to learn a lot about the system catalog of postgresql...



email: mandog

Replies are listed 'Best First'.
Re: Re: Testing?
by chromatic (Archbishop) on Apr 27, 2002 at 21:21 UTC
    We've caught and fixed a bug, but so we are getting close to the point where we spend more time figuring out a test than we spent either on the original code or on the bug fix.
    It's small comfort, but this is usually not an issue in a system that's been tested from the beginning. There's something about writing tests first that forces the design to be simple, orthogonal, and testable.

    Hang in there.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-03-28 14:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found