Loading ...
Sorry, an error occurred while loading the content.
 

[agileDatabases] Test-Driving SQL Server

Expand Messages
  • tpbrown2001
    Kay, Have you taken a look at DBUnit? -- http://dbunit.sourceforge.net It might be a useful tool in a few areas -- loading the test data, testing
    Message 1 of 4 , Aug 31, 2004
      Kay,

      Have you taken a look at DBUnit? -- http://dbunit.sourceforge.net

      It might be a useful tool in a few areas -- loading the test data,
      testing insert/update/delete, etc.

      I haven't used it myself, it's just been on my "bookmark" list for a
      pending project...

      Warm regards,

      Tim





      "Kay A. Pentecost" <tranzpupy@...>
      08/31/2004 09:52 AM
      Please respond to agileDatabases

      To: agileDatabases@yahoogroups.com
      cc:
      Subject: [agileDatabases] Test-Driving SQL Server



      Hi, Everybody,

      I'm still thinking about how to test/ and test-drive the database.

      I'm wondering what needs to be tested in a database, and I've come up
      with a few things that have bitten me in the last few weeks.

      Seems to me, there's two main areas to test: structure and actions.

      Under structure, I need to know
      * Tables exist
      * Fields exist
      * Primary Keys Exist
      * Foreign Keys Exist
      * Triggers, etc Exist
      * Fields are set to NULL or NOT NULL

      As Richard posted, we also need to test

      * Schema changes
      * That test data is loaded...??

      Under Actions, we need to test stored procedures.
      * they are working as expected

      Richard also wanted to:

      Delete the test data and return to a known previous schema
      Test SQLMail
      Test the inbuilt propagation of key changes to related tables
      (UPDATE, DELETE, RESTRICT)
      Test restoring the transaction log
      Test my maintenance SPs (verifying that statistics have been
      updated and sproc caches cleared)

      Now, seems to me that an internal stored procedure would be best for
      testing structural status...

      And it also seems to me that calling stored procedures from the
      application test framework (xUnit) would be best.

      So my two -uh... three questions are:

      * What else needs to be tested in an ongoing way in the database?
      * In regard to testing internally (Stored Procedures) or
      externally (xUnit) which seems to you to be best, and why?
      * What are the advantages and disadvantages of each?

      And I guess, a fourth question... I'm an application developer, who
      needs to work with databases, not a dba... am I missing something
      here?

      Thanks,

      Kay
    • Kay A. Pentecost
      Hi, Tim, VERY helpful! ... Hadn t seen this yet, and it s led to some interesting reading. Google dbUnit for more info. I m working in a Microsoft
      Message 2 of 4 , Aug 31, 2004
        Hi, Tim,

        VERY helpful!

        --- In agileDatabases@yahoogroups.com, "tpbrown2001" <tim_brown@a...>
        wrote:
        >
        > Kay,
        >
        > Have you taken a look at DBUnit? -- http://dbunit.sourceforge.net

        Hadn't seen this yet, and it's led to some interesting reading.
        Google dbUnit for more info.

        I'm working in a Microsoft environment... and some of my favorite
        tools (Eclipse, JUnit) are missing... wonder if anyone is porting
        this to dot net.

        Also made me realiza I was looking for "database" unit testing, and
        not db unit testing or even db testing, so that presents more options.

        Very cool, Tim.

        Thank you!

        Kay
      Your message has been successfully submitted and would be delivered to recipients shortly.