Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Testing & Databases

by jk2addict (Chaplain)
on Jan 28, 2004 at 21:54 UTC ( [id://324803]=note: print w/replies, xml ) Need Help??


in reply to Testing & Databases

I've been working on a web project in which there are core components. tabligs to use those components, pages to use the taglibs, and a database to house the data.

When writing the tests for the package, I used Test::More to cover the core. Apache::Test to test the taglibs and pages in a true HTTP setting. For the database stuff, I decided on using DBD::SQLite. It's an all in one database module.

So the tests load the schema and data via SQL scripts in the terst suite, then I test the core components against that database and verify the results are what I expect.

Of course, this has a potential problem if you are using DB specific features not available in SQLite. But if you're sticking to simple SQL it should be ok.

Update:
For that matter, I chose DBD::SQLite rather than a seperate DB so those test could run in an automated way without and DB connectivity information in at the test location (think CPAN). If DBD::SQLite is installed on the test, tests just hum along without having to interact with the user.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-18 06:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found