Lune

ICSE2023Top-tier venue

Generating Test Databases for Database-Backed Applications

Cong Yan, Suman Nath, Shan Lu

Abstract

Database-backed applications are widely used. To effectively test these applications, one needs to design not only user inputs but also database states, which imposes unique challenges. First, valid database states have to satisfy complicated constraints determined by application semantics, and hence are difficult to synthesize. Second, the state space of a database is huge, as an application can contain tens to hundreds of tables with up to tens of fields per table. Making things worse, each test involving database operations takes significant time to run. Consequently, unhelpful database states and running tests on them can severely waste testing resources. We propose DBGRILLER, a tool that generates database states to facilitate thorough testing of database-backed applications. To effectively generate valid database states, DBGRILLER strategically injects minor mutation into existing database states and transforms part of the application-under-test into a stand-alone validity checker. To tackle the huge database state space and save testing time, DBGRILLER uses program analysis to identify a novel branch-projected DB view that can be used to filter out database states that are unlikely to increase the testing branch coverage. Our evaluation on 9 popular open-source database applications shows that DBGRILLER can effectively increase branch coverage of existing tests and expose previously unknown bugs.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Finding bugs in database systems via query partitioning cites Testing Database Engines via Pivoted Query Synthesis
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on4

  1. Testing Database Engines via Pivoted Query SynthesisManuel Rigger, Zhendong SuOSDI 2020 · 150 citations
  2. Finding bugs in database systems via query partitioningManuel Rigger, Zhendong SuOOPSLA 2020 · 116 citations
  3. BigFuzz: Efficient Fuzz Testing for Data Analytics Using Framework AbstractionQian Zhang, Jiyuan Wang, Muhammad Ali Gulzar, Rohan Padhye et al.ASE 2020 · 27 citations
  4. Managing data constraints in database-backed web applicationsJunwen Yang, Utsav Sethi, Cong Yan, Alvin Cheung et al.ICSE 2020 · 9 citations

Related papers

  1. SynthDB: Synthesizing Database via Program Analysis for Security Testing of Web ApplicationsAn Chen, Jiho Lee, Basanta Chaulagain, Yonghwi Kwon et al.NDSS 2023
  2. Testing Database Engines via Query Plan GuidanceJinsheng Ba, Manuel RiggerICSE 2023 · 39 citations
  3. Griffin : Grammar-Free DBMS FuzzingJingzhou Fu, Jie Liang, Zhiyong Wu, Mingzhe Wang et al.ASE 2022 · 44 citations
  4. SQUIRREL: Testing Database Management Systems with Language Validity and Coverage FeedbackRui Zhong, Yongheng Chen, Hong Hu, Hangfan Zhang et al.CCS 2020 · 5 citations
  5. Metamorphic CoverageJinsheng Ba, Yuancheng Jiang, Manuel RiggerISSTA 2026
Dusk over the sea between two cliffs drawn in fine vertical lines