A Unit-Test Framework for Database Applications

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

Research output: Working paperResearch

3 Citations (Scopus)

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

Personnel

Cite this

Christensen, C. A., Gundersborg, S., de Linde, K., & Torp, K. (2006). A Unit-Test Framework for Database Applications. Aalborg: Department of Computer Science, Aalborg University.
Christensen, Claus Abildgaard ; Gundersborg, Steen ; de Linde, Kristian ; Torp, Kristian. / A Unit-Test Framework for Database Applications. Aalborg : Department of Computer Science, Aalborg University, 2006.
@techreport{08f5a7609fdc11db8ed6000ea68e967b,
title = "A Unit-Test Framework for Database Applications",
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.",
author = "Christensen, {Claus Abildgaard} and Steen Gundersborg and {de Linde}, Kristian and Kristian Torp",
year = "2006",
language = "English",
publisher = "Department of Computer Science, Aalborg University",
type = "WorkingPaper",
institution = "Department of Computer Science, Aalborg University",

}

Christensen, CA, Gundersborg, S, de Linde, K & Torp, K 2006 'A Unit-Test Framework for Database Applications' Department of Computer Science, Aalborg University, Aalborg.

A Unit-Test Framework for Database Applications. / Christensen, Claus Abildgaard; Gundersborg, Steen; de Linde, Kristian; Torp, Kristian.

Aalborg : Department of Computer Science, Aalborg University, 2006.

Research output: Working paperResearch

TY - UNPB

T1 - A Unit-Test Framework for Database Applications

AU - Christensen, Claus Abildgaard

AU - Gundersborg, Steen

AU - de Linde, Kristian

AU - Torp, Kristian

PY - 2006

Y1 - 2006

N2 - 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.

AB - 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.

M3 - Working paper

BT - A Unit-Test Framework for Database Applications

PB - Department of Computer Science, Aalborg University

CY - Aalborg

ER -

Christensen CA, Gundersborg S, de Linde K, Torp K. A Unit-Test Framework for Database Applications. Aalborg: Department of Computer Science, Aalborg University. 2006.