A Unit-Test Framework for Database Applications

Claus Abildgaard Christensen, Steen Gundersborg, Kristian de Linde, Kristian Torp

Research output: Working paper/PreprintWorking paperResearch

Abstract

The outcome of a test of an application that stores data in a database naturally depends on the state of the database. It is therefore important that test developers are able to set up and tear down database states in a simple and efficient manner. In existing unit-test frameworks, setting up and tearing down such test fixtures is labor intensive and often requires copy-and-paste of code. This paper presents an extension to existing unit-test frameworks that allows unit tests to reuse data inserted by other unit tests in a very structured fashion. With this approach, the test fixture for each unit test can be minimized. In addition, the reuse between unit tests can speed up the execution of test suites. A performance test on a medium-size project shows a 40% speed up and an estimated 25% reduction in the number of lines of test code.
Original languageEnglish
Place of PublicationAalborg
PublisherDepartment of Computer Science, Aalborg University
Number of pages18
Publication statusPublished - 2006

Fingerprint

Dive into the research topics of 'A Unit-Test Framework for Database Applications'. Together they form a unique fingerprint.

Cite this