A relational symbolic execution algorithm for constraint-based testing of database programs

Research output: Contribution in Book/Catalog/Report/Conference proceedingConference contribution

167 Downloads (Pure)

Abstract

In constraint-based program testing, sym- bolic execution is a technique which allows to generate test data exercising a given execution path, selected within the program to be tested. Applied to a set of paths covering a sufficient part of the code under test, this technique permits to generate automatically adequate test sets for units of code. As databases are ubiquitous in software, generalizing such a technique for efficient testing of programs manipulating databases is an interesting approach to enhance the reliability of software. In this work, we propose a relational symbolic execution algorithm to be used for testing of simple Java methods, reading and writing with transactional SQL in a relational database, subject to integrity constraints. This algorithm considers the Java method under test as a sequence of operations over a set of constrained relational variables, modeling both the database tables and the method variables. By integrating this relational model of the method and database with the classical symbolic execution process, the algorithm can generate a set of Alloy constraints for any finite path to test in the control-flow graph of the method. Solutions of these constraints are data which constitute a test case, including valid content for the database, which exercises the selected path in the method. A tool implementing the proposed algorithm is demonstrated over a number of examples.

Original languageEnglish
Title of host publicationIEEE 13th International Working Conference on Source Code Analysis and Manipulation, SCAM 2013
PublisherIEEE Computer society
Pages179-188
Number of pages10
ISBN (Print)9781467357395
DOIs
Publication statusPublished - 22 Sep 2013
Event2013 IEEE 13th International Working Conference on Source Code Analysis and Manipulation, SCAM 2013 - Eindhoven, Netherlands
Duration: 22 Sep 201323 Sep 2013

Conference

Conference2013 IEEE 13th International Working Conference on Source Code Analysis and Manipulation, SCAM 2013
CountryNetherlands
CityEindhoven
Period22/09/1323/09/13

Fingerprint

Testing
Flow graphs

Cite this

Marcozzi, M., Vanhoof, W., & Hainaut, J-L. (2013). A relational symbolic execution algorithm for constraint-based testing of database programs. In IEEE 13th International Working Conference on Source Code Analysis and Manipulation, SCAM 2013 (pp. 179-188). [6648200] IEEE Computer society. https://doi.org/10.1109/SCAM.2013.6648200
Marcozzi, Michaël ; Vanhoof, Wim ; Hainaut, Jean-Luc. / A relational symbolic execution algorithm for constraint-based testing of database programs. IEEE 13th International Working Conference on Source Code Analysis and Manipulation, SCAM 2013. IEEE Computer society, 2013. pp. 179-188
@inproceedings{84bfd828d39e442a9eec8ed0c8f5a493,
title = "A relational symbolic execution algorithm for constraint-based testing of database programs",
abstract = "In constraint-based program testing, sym- bolic execution is a technique which allows to generate test data exercising a given execution path, selected within the program to be tested. Applied to a set of paths covering a sufficient part of the code under test, this technique permits to generate automatically adequate test sets for units of code. As databases are ubiquitous in software, generalizing such a technique for efficient testing of programs manipulating databases is an interesting approach to enhance the reliability of software. In this work, we propose a relational symbolic execution algorithm to be used for testing of simple Java methods, reading and writing with transactional SQL in a relational database, subject to integrity constraints. This algorithm considers the Java method under test as a sequence of operations over a set of constrained relational variables, modeling both the database tables and the method variables. By integrating this relational model of the method and database with the classical symbolic execution process, the algorithm can generate a set of Alloy constraints for any finite path to test in the control-flow graph of the method. Solutions of these constraints are data which constitute a test case, including valid content for the database, which exercises the selected path in the method. A tool implementing the proposed algorithm is demonstrated over a number of examples.",
author = "Micha{\"e}l Marcozzi and Wim Vanhoof and Jean-Luc Hainaut",
year = "2013",
month = "9",
day = "22",
doi = "10.1109/SCAM.2013.6648200",
language = "English",
isbn = "9781467357395",
pages = "179--188",
booktitle = "IEEE 13th International Working Conference on Source Code Analysis and Manipulation, SCAM 2013",
publisher = "IEEE Computer society",

}

Marcozzi, M, Vanhoof, W & Hainaut, J-L 2013, A relational symbolic execution algorithm for constraint-based testing of database programs. in IEEE 13th International Working Conference on Source Code Analysis and Manipulation, SCAM 2013., 6648200, IEEE Computer society, pp. 179-188, 2013 IEEE 13th International Working Conference on Source Code Analysis and Manipulation, SCAM 2013, Eindhoven, Netherlands, 22/09/13. https://doi.org/10.1109/SCAM.2013.6648200

A relational symbolic execution algorithm for constraint-based testing of database programs. / Marcozzi, Michaël; Vanhoof, Wim; Hainaut, Jean-Luc.

IEEE 13th International Working Conference on Source Code Analysis and Manipulation, SCAM 2013. IEEE Computer society, 2013. p. 179-188 6648200.

Research output: Contribution in Book/Catalog/Report/Conference proceedingConference contribution

TY - GEN

T1 - A relational symbolic execution algorithm for constraint-based testing of database programs

AU - Marcozzi, Michaël

AU - Vanhoof, Wim

AU - Hainaut, Jean-Luc

PY - 2013/9/22

Y1 - 2013/9/22

N2 - In constraint-based program testing, sym- bolic execution is a technique which allows to generate test data exercising a given execution path, selected within the program to be tested. Applied to a set of paths covering a sufficient part of the code under test, this technique permits to generate automatically adequate test sets for units of code. As databases are ubiquitous in software, generalizing such a technique for efficient testing of programs manipulating databases is an interesting approach to enhance the reliability of software. In this work, we propose a relational symbolic execution algorithm to be used for testing of simple Java methods, reading and writing with transactional SQL in a relational database, subject to integrity constraints. This algorithm considers the Java method under test as a sequence of operations over a set of constrained relational variables, modeling both the database tables and the method variables. By integrating this relational model of the method and database with the classical symbolic execution process, the algorithm can generate a set of Alloy constraints for any finite path to test in the control-flow graph of the method. Solutions of these constraints are data which constitute a test case, including valid content for the database, which exercises the selected path in the method. A tool implementing the proposed algorithm is demonstrated over a number of examples.

AB - In constraint-based program testing, sym- bolic execution is a technique which allows to generate test data exercising a given execution path, selected within the program to be tested. Applied to a set of paths covering a sufficient part of the code under test, this technique permits to generate automatically adequate test sets for units of code. As databases are ubiquitous in software, generalizing such a technique for efficient testing of programs manipulating databases is an interesting approach to enhance the reliability of software. In this work, we propose a relational symbolic execution algorithm to be used for testing of simple Java methods, reading and writing with transactional SQL in a relational database, subject to integrity constraints. This algorithm considers the Java method under test as a sequence of operations over a set of constrained relational variables, modeling both the database tables and the method variables. By integrating this relational model of the method and database with the classical symbolic execution process, the algorithm can generate a set of Alloy constraints for any finite path to test in the control-flow graph of the method. Solutions of these constraints are data which constitute a test case, including valid content for the database, which exercises the selected path in the method. A tool implementing the proposed algorithm is demonstrated over a number of examples.

UR - http://www.scopus.com/inward/record.url?scp=84891067383&partnerID=8YFLogxK

U2 - 10.1109/SCAM.2013.6648200

DO - 10.1109/SCAM.2013.6648200

M3 - Conference contribution

AN - SCOPUS:84891067383

SN - 9781467357395

SP - 179

EP - 188

BT - IEEE 13th International Working Conference on Source Code Analysis and Manipulation, SCAM 2013

PB - IEEE Computer society

ER -

Marcozzi M, Vanhoof W, Hainaut J-L. A relational symbolic execution algorithm for constraint-based testing of database programs. In IEEE 13th International Working Conference on Source Code Analysis and Manipulation, SCAM 2013. IEEE Computer society. 2013. p. 179-188. 6648200 https://doi.org/10.1109/SCAM.2013.6648200