For a full test you really need some End to End testing. That is a general rule....
That is not really true. You should be testing interfaces. If each interface receives and transmits data as you expect, you need not do full End to End testing. It's the kind of thing I would only do in development. The DBI/DBD modules are tested very well, so all you need is to ensure the SQL query you send is as expected, and the test data returned is processed correctly. Both of these can be handled very well with mocking.
As for coding for different databases, then this should be part of your development testing, and not part of the install testing. If you are writing to enable the use of different databases, by all means use DBI to see if the appropriate drivers (and versions) are loaded. However, you shouldn't need to test whether the database handles a specific syntax at the install stage.
Regards transactions, this is fine if the database you are testing can handle transactions. Unfortunately there are several people who are running non-transaction enabled databases, such as MySQL (although I believe version 4 has can handle them), and authors who are coding their modules specifically for them.
--
Barbie | Birmingham Perl Mongers | http://birmingham.pm.org/
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|