Post Date
Oct 22 2021

Automated Testing of Database Driven Applications

Year
2020
Supervisor:
Dr. Junaid Haroon Siddique
Students:
Maryam Abdul Ghafoor
MS/PhD
PhD
Reference / Filters
Computer Science
Abstract:
The testing of database-driven applications is crucial for the correct working of the system.
Despite the progress in the field of automated software testing, its usage in database-driven applications
remains a difficult task. A test case written for these applications includes database
state in addition to the standard test inputs. Moreover, database-driven applications are conjunction
of imperative and declarative languages. The interplay between these languages has imposed
new challenges on automated testing of database-driven applications. In today’s data-driven world,
databases and data inside them power business decisions. Recent advancements in technology have
opened many paradigms for enterprise applications to store, manage, and retrieve information from
the databases.

In this thesis, we propose that different program analysis techniques can be employed to test the
functionality of database-driven applications. Dynamic execution is a state-of-art program analysis
technique that works by executing the application under test and provides high code coverage.
We present a testing technique that adapts dynamic symbolic execution to model databases and
database systems for SQL based applications. We also employ model checking well-known program
analysis technique in SQL based concurrent applications to detect schedules that lead to an
inconsistent database state. Our hybrid approach of using dynamic symbolic execution along with
model checking can test NoSQL based database-driven applications.

To assess the effectiveness of using dynamic symbolic execution on database-driven applications,
we evaluated our technique on 500 procedures from online projects. Our results show that
our methods successfully model databases for both SQL and NoSQL applications. Furthermore,
it generates around 350 test cases that trigger constraint violations or hit user-defined exceptions.
In the case of concurrent applications, our approach gives 1.4x reduction in state space of program
often providing a 2.8x speedup for verification.

To conclude, our proposed approach for testing database application provides full path coverage
along with thorough testing, and for multi-threaded applications, it efficiently explores state
space of the program.