paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Generating Test Databases for Database-Backed Applications

为数据库支持的应用生成测试数据库
ICSE 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)2023匹配度 3/10 · 该论文属于程序分析与软件测试领域,利用程序分析生成/过滤数据库测试状态,但研究对象是数据库支撑应用的测试,而非用户关注的 PL→AI/Agentic、AI→PL、浮点程序分析或贝叶斯程序分析及其与 LLM 的交叉。其程序分析技术可能有间接参考价值,但主题与核心研究方向不匹配。引用 3 inbox
Cong Yan, Suman Nath, Shan Lu
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 DBGRILLER,通过变异现有数据库状态并用程序分析过滤,生成有效测试数据库以提升分支覆盖并暴露缺陷。

数据库支持的应用需要同时设计用户输入和数据库状态才能充分测试,但有效数据库状态需满足由应用语义决定的复杂约束,且数据库状态空间巨大(可达数十到数百张表),涉及数据库操作的测试运行也很慢,因此无效状态会浪费测试资源。本文提出 DBGRILLER,它向已有数据库状态中策略性地注入小幅变异来生成候选状态,并把被测应用的一部分转换为独立有效性检查器;同时利用程序分析识别一种新的 branch-projected DB view,用于过滤那些不太可能增加分支覆盖的数据库状态。作者在 9 个流行的开源数据库应用上评估,结果表明 DBGRILLER 能有效提升现有测试的分支覆盖,并暴露此前未知的缺陷。

问题
数据库支持应用的测试需要同时覆盖用户输入和数据库状态,而有效的数据库状态受复杂应用语义约束,且状态空间巨大、测试执行昂贵。
方法
DBGRILLER 对现有数据库状态注入小幅变异,将被测应用的一部分转换为独立有效性检查器,并利用程序分析得到 branch-projected DB view 以过滤低收益状态。
评估
在 9 个流行的开源数据库应用上评估,显示其能提升现有测试的分支覆盖并发现此前未知的 bug。
原文摘要(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.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{YanNL23,
  title = {Generating Test Databases for Database-Backed Applications},
  author = {Cong Yan and Suman Nath and Shan Lu},
  booktitle = {ICSE},
  year = {2023},
  doi = {10.1109/icse48619.2023.00173}
}