By the time you read this, merlyn will probably have passed me (again) as the number one monk on Perlmonks (discounting the site creator and his extra million XP, of course :). This seems a bit more reasonable than my sitting up there as top dog. While I like Perlmonks, too many people equate XP with Perl experience.
In other news, we just hit 2000 tests for our latest project. Unfortunately, the tests were getting to be tough to manage as many of them took so long to run that it was tempting to skip the entire suite altogether (I suspect that some recent test failures were due to this problem). As a result, I wrote a little snippet to better manage tests. (the link is to a version that includes pod documentation)
#!/usr/bin/perl -wNeat script, by the way.
Re:Long-running tests
Ovid on 2003-04-04T00:52:13
Glad you like the script. As for the perfomance problem, try running various combinations of this:
SELECT foo FROM bar WHERE baz LIKE '%quux%'And do that on huge tables. The LIKE clause negates the use of indices, so I'm not sure how to get around this problem. Unfortunately, due to business requirements, we have this repeatedly. If you have any suggestions
... Re:Long-running tests
dws on 2003-04-04T01:09:57
Yeah, that case is pathological. Better to move it off to the side and only run it periodically.Re:Long-running tests
chromatic on 2003-04-04T02:11:00
How about a test-only database, with just a few rows of data copied from the live database? The fewer rows to scan, the less time a search takes.
Re:Long-running tests
runrig on 2003-04-04T02:15:55
Unless you can create some sort of full-text search index, you're stuck. Though, depending on the database, you might be able to do a little something on the dba side of things (defragment empty table space, etc.).Re:Long-running tests
pdcawley on 2003-04-04T05:40:47
Mock the DBI handle. Check that the right queries are being issued, and return the 'right' data.
Run the customer/acceptance tests against a real database (but they get run once or twice a day rather than all the time so speed is less of an issue).