理解与跨数据库系统复用测试套件
Understanding and Reusing Test Suites Across Database Systems
AI总结:
本文提出统一测试套件 SQuaLity,整合 SQLite、PostgreSQL 和 DuckDB 测试用例,并通过实证研究揭示跨 DBMS 测试复用的格式、标准与依赖障碍,同时发现多个崩溃、挂起和兼容性问题。
摘要:
数据库管理系统(DBMS)开发者已经实现了大量测试套件来测试其 DBMS。例如,SQLite 测试套件包含超过 9200 万行代码。尽管付出了这些广泛努力,测试套件并未在不同 DBMS 之间得到系统化复用,从而造成工作浪费。集成具有挑战性,因为测试套件使用各种测试用例格式,并依赖非标准化的测试运行器特性。我们提出了一个统一测试套件 SQuaLity,在其中集成了来自三个广泛使用的 DBMS(SQLite、PostgreSQL 和 DuckDB)的测试用例。此外,我们提出一项实证研究,以确定复用这些系统测试套件的潜力。结果表明,复用测试套件具有挑战性:第一,测试格式和测试运行器命令差异很大;例如,SQLite 有 4 个测试运行器命令,而 MySQL 有 112 个命令并带有附加特性,例如用于执行文件操作或与 shell 交互。第二,尽管一些测试套件主要包含符合标准的语句(例如 SQLite 中为 99%),其他测试套件则主要测试非标准化功能(例如 PostgreSQL 测试套件中 31% 的语句是非标准化的)。第三,测试复用因各种显式和隐式依赖而变得复杂,例如需要设置变量和配置、某些测试用例需要默认不存在的扩展,以及查询结果依赖于特定客户端。尽管有上述发现,我们通过跨 DBMS 执行测试套件,在四个不同的 DBMS 中识别出 3 个崩溃、3 个挂起和多个兼容性问题,表明了复用的收益。总体而言,这项工作代表了在 DBMS 场景中实现测试用例复用的第一步,我们希望它能激发关于这一重要主题的后续工作。
英文摘要:
Database Management System (DBMS) developers have implemented extensive test suites to test their DBMSs. For example, the SQLite test suites contain over 92 million lines of code. Despite these extensive efforts, test suites are not systematically reused across DBMSs, leading to wasted effort. Integration is challenging, as test suites use various test case formats and rely on unstandardized test runner features. We present a unified test suite, SQuaLity, in which we integrated test cases from three widely-used DBMSs, SQLite, PostgreSQL, and DuckDB. In addition, we present an empirical study to determine the potential of reusing these systems' test suites. Our results indicate that reusing test suites is challenging: First, test formats and test runner commands vary widely; for example, SQLite has 4 test runner commands, while MySQL has 112 commands with additional features, to, for example, execute file operations or interact with a shell. Second, while some test suites contain mostly standard-compliant statements (e.g., 99% in SQLite), other test suites mostly test non-standardized functionality (e.g., 31% of statements in the PostgreSQL test suite are nonstandardized). Third, test reuse is complicated by various explicit and implicit dependencies, such as the need to set variables and configurations, certain test cases requiring extensions not present by default, and query results depending on specific clients. Despite the above findings, we have identified 3 crashes, 3 hangs, and multiple compatibility issues across four different DBMSs by executing test suites across DBMSs, indicating the benefits of reuse. Overall, this work represents the first step towards test-case reuse in the context of DBMSs, and we hope that it will inspire follow-up work on this important topic.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。