Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Writing Test Case for Database Connectivity

by manorhce (Beadle)
on Feb 06, 2013 at 07:16 UTC ( [id://1017348]=perlquestion: print w/replies, xml ) Need Help??

manorhce has asked for the wisdom of the Perl Monks concerning the following question:

I am writing test cases for my application my problem is the modules which is used to connect to database, for that I am writing test cases and it connects to database and loads the database

My Point is that can Perl provides mock database object so that every time it will not connect database, It will create database mock object

UPDATE

I am writing like below

ok($db = Denali::DB->new(), "Connect"); isa_ok($db, "Denali::DB"); my $dddd = Denali::DB->connect();

Replies are listed 'Best First'.
Re: Writing Test Case for Database Connectivity
by kcott (Archbishop) on Feb 06, 2013 at 07:27 UTC
Re: Writing Test Case for Database Connectivity
by moritz (Cardinal) on Feb 06, 2013 at 10:57 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-26 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found