TY - GEN
T1 - Generating program inputs for database application testing
AU - Pan, Kai
AU - Wu, Xintao
AU - Xie, Tao
PY - 2011
Y1 - 2011
N2 - Testing is essential for quality assurance of database applications. Achieving high code coverage of the database application is important in testing. In practice, there may exist a copy of live databases that can be used for database application testing. Using an existing database state is desirable since it tends to be representative of real-world objects' characteristics, helping detect faults that could cause failures in real-world settings. However, to cover a specific program code portion (e.g., block), appropriate program inputs also need to be generated for the given existing database state. To address this issue, in this paper, we propose a novel approach that generates program inputs for achieving high code coverage of a database application, given an existing database state. Our approach uses symbolic execution to track how program inputs are transformed before appearing in the executed SQL queries and how the constraints on query results affect the application's execution. One significant challenge in our problem context is the gap between program-input constraints derived from the program and from the given existing database state; satisfying both types of constraints is needed to cover a specific program code portion. Our approach includes novel query formulation to bridge this gap. Our approach is loosely integrated into Pex, a state-of-the-art white-box testing tool for.NET from Microsoft Research. Empirical evaluations on two real database applications show that our approach assists Pex to generate program inputs that achieve higher code coverage than the program inputs generated by Pex without our approach's assistance.
AB - Testing is essential for quality assurance of database applications. Achieving high code coverage of the database application is important in testing. In practice, there may exist a copy of live databases that can be used for database application testing. Using an existing database state is desirable since it tends to be representative of real-world objects' characteristics, helping detect faults that could cause failures in real-world settings. However, to cover a specific program code portion (e.g., block), appropriate program inputs also need to be generated for the given existing database state. To address this issue, in this paper, we propose a novel approach that generates program inputs for achieving high code coverage of a database application, given an existing database state. Our approach uses symbolic execution to track how program inputs are transformed before appearing in the executed SQL queries and how the constraints on query results affect the application's execution. One significant challenge in our problem context is the gap between program-input constraints derived from the program and from the given existing database state; satisfying both types of constraints is needed to cover a specific program code portion. Our approach includes novel query formulation to bridge this gap. Our approach is loosely integrated into Pex, a state-of-the-art white-box testing tool for.NET from Microsoft Research. Empirical evaluations on two real database applications show that our approach assists Pex to generate program inputs that achieve higher code coverage than the program inputs generated by Pex without our approach's assistance.
UR - http://www.scopus.com/inward/record.url?scp=84855437039&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84855437039&partnerID=8YFLogxK
U2 - 10.1109/ASE.2011.6100152
DO - 10.1109/ASE.2011.6100152
M3 - Conference contribution
AN - SCOPUS:84855437039
SN - 9781457716393
T3 - 2011 26th IEEE/ACM International Conference on Automated Software Engineering, ASE 2011, Proceedings
SP - 73
EP - 82
BT - 2011 26th IEEE/ACM International Conference on Automated Software Engineering, ASE 2011, Proceedings
T2 - 2011 26th IEEE/ACM International Conference on Automated Software Engineering, ASE 2011
Y2 - 6 November 2011 through 10 November 2011
ER -