Guided test generation for database applications via synthesized database interactions

Kai Pan, Xintao Wu, Tao Xie

Research output: Contribution to journalArticle

Abstract

Testing database applications typically requires the generation of tests consisting of both program inputs and database states. Recently, a testing technique called Dynamic Symbolic Execution (DSE) has been proposed to reduce manual effort in test generation for software applications. However, applying DSE to generate tests for database applications faces various technical challenges. For example, the database application under test needs to physically connect to the associated database, which may not be available for various reasons. The program inputs whose values are used to form the executed queries are not treated symbolically, posing difficulties for generating valid database states or appropriate database states for achieving high coverage of query-result-manipulation code. To address these challenges, in this article, we propose an approach called SynDB that synthesizes new database interactions to replace the original ones from the database application under test. In this way, we bridge various constraints within a database application: query-construction constraints, query constraints, database schema constraints, and query-result-manipulation constraints.We then apply a state-of-the-art DSE engine called Pex for .NET from Microsoft Research to generate both program inputs and database states. The evaluation results show that tests generated by our approach can achieve higher code coverage than existing test generation approaches for database applications.

Original languageEnglish (US)
Article number12
JournalACM Transactions on Software Engineering and Methodology
Volume23
Issue number2
DOIs
StatePublished - Mar 2014

Keywords

  • Automatic test generation
  • Database application testing
  • Dynamic symbolic execution
  • Synthesized database interactions

ASJC Scopus subject areas

  • Software

Fingerprint Dive into the research topics of 'Guided test generation for database applications via synthesized database interactions'. Together they form a unique fingerprint.

  • Cite this