Home » Archives

Content tagged with: database

[25 Feb 2013 | No Comment | ]

The SQL Server unit tests feature have been added in the December 2012 update of SQL Server Data Tools (SSDT). This article presents a detailed information on how to create an run unit tests in SQL Server.

[9 Oct 2012 | No Comment | ]

In this blog post, Nicolas Frankel explains how to perform unit testing on a database using DBUnit, Spring and TestNG. DbUnit is a JUnit extension for database-driven projects that, among other things, puts your database into a known state between test runs. This is an excellent tool to avoid the issues that can occur when one test case corrupts the database and causes subsequent tests to fail. DbUnit has also the ability to export and import your database data to and from XML datasets.

[20 Aug 2012 | No Comment | ]

This blog post explains how to perform unit testing of MySQL stored procedures. A stored routine is a set of SQL statements that can be stored in the server. Once this has been done, clients don’t need to keep reissuing the individual statements but can refer to the stored routine instead. To perform unit testing on stored procedures, you can use utMySQL, an open source unit test framework for MySQL stored procedures. This post provides a step by step process on how to create the test code in utMySQL which …

[19 Apr 2012 | No Comment | ]

Running your SQL Server database unit tests within the scope of a single transaction allows you to roll back any changes that the test enacted after the test ends. This article propose a step by step approach to achieve this goal. You start to create a transaction in your Transact-SQL test script that uses BEGIN TRANSACTION and ROLLBACK TRANSACTION. Then you will create a transaction for a single test method in a test class and then a transaction for all test methods in a given test class.

[23 Jan 2012 | No Comment | ]

In this blog post, Jens Schauder shares some tips based on experience to improve the testing of database code. People seem to understand the need to test their code, but apparently this is not yet the case for the the database code, because database tests tend to be slow, interdependent and hard to maintain

[14 Mar 2011 | No Comment | ]

This blog post discusses the problem of testing the database code. It describes some of the problems and proposes possible partial solutions to this testing issue based on Hibernate and JUnit.

[14 Mar 2010 | No Comment | ]

Apache JMeter is a performance testing tool which is entirely written in Java. Any application that works on request/response model can be load tested with JMeter. A relational database is not an exception: receives sql queries, executes them and returns the results of the execution. This post  shows you how easy it is to set up test scenarios with the graphical user interface of JMeter.

[23 Jan 2010 | No Comment | ]

This article overviews the importance of, and strategies for, regression testing relational databases. If your organization considers data to be a corporate asset and/or you’re implementing mission-critical functionality within your databases, shouldn’t you have a database testing strategy in place?