Testing & QA - ImageConstrux - software development best practices
SeminarsConsultingResources & ToolsAbout Us
Solutions
I'm hearing about "test first" development. What is that?
Solution One Go
How can a tester improve his or her skills?
Solution Two Go
Testing & QA .:. Software Testing & QA Resources

Testing Database Systems

If you separate the idea of testing the interfaces to your database from testing the database internals, then the usual unit testing frameworks (xUnit) work for testing the interfaces. Tools are beginning to be available to help with testing the internals. See Visual Studio Team System for Database Professionals (for SQL Server), Eclipse Data Tools Platform, and Qute from Quest (for Oracle) for examples.

Unit Testing Databases

Scott W. Ambler, Agile Database Techniques: Effective Strategies for the Agile Software Developer, Wiley and Sons, 2003.

Scott W. Ambler, "Ensuring Database Quality", Dr. Dobb’s Journal, Vol 31, Issue 12, December, 2006, pages 63-65.

Scott W. Ambler and PramodSadalage, Refactoring Databases: Evolutionary Database Design, Addison-Wesley, 2006.

Scott W Ambler, "Database Testing: How to Regression Test a Relational Database", 2006.

Scott W. Ambler, "Database Regression Testing", 2006.

Scott W. Ambler, "Test-Driven Development of Relational Databases", IEEE Software, May/June 2007, pp 37-43. This is an excellent article and well worth reading.

David Astels, Test-Driven Development: A Practical Guide, Prentice Hall PTR, 2003
S
ee Chapter 5, page 97 on Daedalos JUnit Extensions (djux) for testing databases. Djux supplies methods useful for checking if a row was added to a database, for example.

Shirley A. Becker and Anthony Berkemeyer, "The Application of a Software Testing Technique to Uncover Errors in Database Systems", Proceedings of the 20th Pacific Northwest Software Quality Conference, 1999, pp 173-183. The link is to the whole .pdf of the conference proceedings - print pages 170-180 for this paper.

Richard Dallaway, "Unit Testing Database Code", 2006.

Martin Fowler and Pramod Sadalage, "Evolutionary Database Design", 2003. Good, practical advice on what works in an agile project to allow evolutionary changes to the database design.

Vincent Massol with Ted Husted, Junit in Action, Manning Publications Co., 2004
See Chapter 11 on Unit Testing Databases.

Gerard Meszaros, XUnit Test Patterns, Addison-Wesley, 2007 (intermediate-advanced). Discusses Testing with Databases in Chapter 13.

J.B. Rainsberger, Junit Recipes, Manning Publications, 2004 (advanced). Chapter 10 is on Testing and JDBC and Chapter 11 is on testing Enterprise Java Beans, including data access.

Bill Siggelkow, "DBUnit Made Easy", 2005. Shows how DBUnit can be used to extract data from an existing database into an XML file, and then be used to reload the data into a test database.

Alex Vollmer, "Unit-Testing Hibernate with HSQLDB", 2005. Hibernate is an object-relational mapping mechanism. HSQLDB is an in-memore SQL database. You can use Hibernate to unit test against HSQLDB rather than your real production database.

Agile Database Development

Scott Ambler, Agile Database Techniques: Effective Strategies for the Agile Software Developer, Wiley and sons, 2003.

Scott Ambler, "Agile Best Practices for Data Warehousing (DW)/Business Intelligence (BI) Projects", 2007.

Scott W. Ambler, "Evolutionary/Agile Database Best Practices", 2007.

Look on the www.agiledata.org site for more articles on agile database development.

Scott Ambler and Pramod Sadalage, Refactoring Databases: Evolutionary Database Design, Addison-Wesley, 2006.

Scott Ambler, "Development Sandboxes: An Agile Best Practice", 2003.

Martin Fowler and Pramod Sadalage, "Evolutionary Database Design", 2003.

System Testing Databases

Chris McMahon, "Old School Meets New Wave", Better Software Magazine, June 2006, pages 28-32, (on testing middleware). On using scripted automation to do system testing for a message broker implementation and an agile project.

Don Slutz, "Massive Stochastic Testing of SQL", Proceedings of the Very Large Database Conference 1998. They developed a tool to generate statistically random SQL. inputs.

Database Testing Tools- unit testing tools

These tools enable you to regression test your database.

DBFit

DbUnit provides several useful functions for unit testing databases. For example it can load a database from an XML file.

NDbUnit

OUnit for Oracle- from Quest - nowQUTE. QUTE from Quest validates Oracle PLSQL code.

SQLUnit

TSQLUnit (for testing t-SQL in MS SQL Server)

Microsoft's Visual Studio Team System for Database Professionals is an IDE that comes with data tools. This product includes testing tools for Microsoft’s SQL server XTUnit

Database Testing tools - for load testing

These tools simulate high usage loads on your database, enabling you to determine whether your system’s architecture will stand up to your true production needs.

Empirix

Mercury Interactive - now owned by HP.

RadView

Rational Suite Test Studio - now owned by IBM.

Web Performance

Database testing tools - test data generators

Developers need test data against which to validate their systems. Test data generators can be particularly useful when you need large amounts of test data, perhaps for stress or load testing.

For small amounts of test data, tools like DbUnit can help. You can store the data as XML files and use DbUnit to load it.

Data Factory

Datatect

DTM Data Generator.

Turbo Data

Other data related tools

Cactus allows you to start the test inside a container, e.g. to test a database that runs on a web server.

Daedalos Junit Extensions, Djux for short provides the ability to open the database at the start of a series of tests and close it at the end of the series, which makes the set of tests run faster; it also provides some methods for checking databases, for example to check if a row is present.

Eclipse Data Tools Platform is an IDE that comes with data tools.

JBoss provides a J2EE container and a database you can use for testing. HypersonicSQL is the in-memory database. JBoss comes preconfigured with HypersonicSQL.

Jetty provides a web server you can embed in your test class. Jetty is fast and lightweight, and can be completely controlled in Java from your test case.

Redgate tools for SQL Server can compare schemas, compare SQL data, etc.

Data Quality

Lydia Ash, "Data Set Analysis : Approaches to Testing when the Build is the Data", CAST 2007 presentation, Bellevue WA, July 2007.

Laure Berti-Equille, "Quality-Aware Data Management and Mining, Institut National de Recherche in Informatique et en Automatique, 2007.

Laure Berti-Équille, « La qualité des données comme condition à la qualité des connaissances : un état de l'art, in: Mesures de qualité pour la fouille de données. Numéro spécial, Revue Nationale des Technologies de l'Information (RNTI »),Cépaduès 2004.

Laure Berti-Équille , F. Moussouni. "Quality-Aware Integration and Warehousing of Genomic Data" in: Proceedings of the 10th Intl.Conference on Information Quality, IQ'05, Massachusetts Institute of Technology, Cambridge, MA, USA, November 2005.

Laure Berti-Équille, « Nettoyage des données XML : combien ça coûte ? », in: Actes du 1er Atelier Qualités des Données et des Connaissances, DKQ'05, en conjunction avec la conférence Extraction et Gestion des Connaissances, EGC'05, Paris, France, January 2005.

Laure Berti-Équille, "Cost of Low-Quality Data over Association Rules Discovery", in: Proceedings of the International Symposium on Applied Stochastic Models and Data Analysis, AMSDA'05, >Brest, France, May 2005.

Laure Berti-Équille, "Recommendation of XML Documents exploiting Quality Metadata and Views", in: Proceedings of the 2nd International Workshop on Data and Information Quality, DIQ'05, in conjunction with the 17th Conference on Advanced Information Systems Engineering, CAiSE'05, Porto, Portugal, June 2005.

Laure Berti-Équille, "Quality-Adaptive Query Processing over distributed Sources", in: International Conference on Information Quality, M.I.T., Boston, U.S., November 2004.

T. Dasu T. Johnson, Exploratory Data Mining and Data Cleaning John Wiley and Sons, 2003.

Larry English, Improving Data Warehouse and Business Information Quality, New York, Wiley, 1999.

M. Hernandez, S. Stolfo, "Real-World Data is Dirty: Data Cleansing and the Merge/Purge Problem" in: Journal of Data Mining and Knowledge Discovery, 1998, vol. 2, no 1, p. 9-37.

David Isaac and Christopher Lynnes, "Automated Data Quality Assessment in the Intelligent Archive", white paper prepared for the Intelligent Data Understanding program, January 2003.

Jack Olson, Data Quality: The Accuracy Dimension, Morgan Kaufmann, 2002.

T. Redman, Data Quality for the Information Age, Artech House, 1996.

login >