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?? |
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
In Section
Seekers of Perl Wisdom
|
|