tailieunhanh - Dynamic Test Input Generation for Database Applications

Agile businesses want to be able to quickly adopt new technologies, whether it's operating systems, servers, or software, to help them stay ahead of the competition. However, change often introduces a period of instability into mission-critical IT systems. Oracle Real Application Testing—with Oracle Database 11g Enterprise Edition—allows businesses to quickly adopt new technologies while eliminating the risks associated with change. Oracle Real Application Testing combines a workload capture and replay feature with an SQL performance analyzer to help you test changes against real-life workloads, then helps you fine-tune them before putting them into production. . | Dynamic Test Input Generation for Database Applications Michael Emmi UC Los Angeles mje@ Rupak Majumdar UC Los Angeles rupak@ Koushik Sen UC Berkeley ksen@cs .berkeley. edu ABSTRACT We describe an algorithm for automatic test input generation for database applications. Given a program in an imperative language that interacts with a database through API calls our algorithm generates both input data for the program as well as suitable database records to systematically explore all paths of the program including those paths whose execution depend on data returned by database queries. Our algorithm is based on concolic execution where the program is run with concrete inputs and simultaneously also with symbolic inputs for both program variables as well as the database state. The symbolic constraints generated along a path enable us to derive new input values and new database records that can cause execution to hit uncovered paths. Simultaneously the concrete execution helps to retain precision in the symbolic computations by allowing dynamic values to be used in the symbolic executor. This allows our algorithm for example to identify concrete SQL queries made by the program even if these queries are built dynamically. The contributions of this paper are the following. We develop an algorithm that can track symbolic constraints across language boundaries and use those constraints in conjunction with a novel constraint solver to generate both program inputs and database state. We propose a constraint solver that can solve symbolic constraints consisting of both linear arithmetic constraints over variables as well as string constraints string equality disequality as well as membership in regular languages . Finally we provide an evaluation of the algorithm on a Java implementation of MediaWiki a popular wiki package that interacts with a database backend. Categories and Subject Descriptors Software Engineering Testing and debugging. .