kirancodes.me
To Proof Maintenance & Beyond!

Coni: Detecting Database Connector Bugs via State-Aware Test Case Generation

Wenqian Deng, Jie Liang, Zhiyong Wu, Jingzhou Fu, Mingzhe Wang, Yu Jiang

Abstract

Database connectors are widely used in many applications to facilitate flexible and convenient database interactions. Potential bugs in database connectors can lead to various abnormal behaviors within applications, such as returning incorrect results or experiencing unexpected connection interruption. However, existing DBMS fuzzing works cannot be directly applied to testing database connectors as they mainly focus on SQL generation and use a small subset of connector interfaces. Automated test case generation also struggles to generate effective test cases that explore intricate interactions of database connectors due to a lack of domain knowledge. The main challenge in testing database connectors is generating semantically correct test cases that can trigger various connector state transitions. To address that, we propose CONI, a framework designed for detecting logic bugs of database connectors with state-aware test case generation. First, we define the database connector state model by analyzing the corresponding standard specification. Building upon this model, Coni generates interface call sequences within test cases to encompass various state transitions. After that, Coni generates suitable parameter values based on the parameter information and contextual information collected during runtime. Then the test cases are executed on a target and a reference database connector. Inconsistent results indicate potential bugs. We evaluated CONI on 5 widely-used JDBC database connectors, namely MySQL Connector/J, MariaDB Connector/J, AWS JDBC Driver for MySQL, PGJDBC, and PG JDBC NG. In total, Coni reported 44 previously unknown bugs, of which 34 have been confirmed.

BibTeX
@inproceedings{Deng-al:ICSE25,
  author    = {Wenqian Deng and
               Jie Liang and
               Zhiyong Wu and
               Jingzhou Fu and
               Mingzhe Wang and
               Yu Jiang},
  title     = {Coni: Detecting Database Connector Bugs via {State-Aware} Test Case Generation},
  booktitle = {ICSE},
  pages     = {667--678},
  publisher = {{IEEE}},
  year      = {2025},
}

Related papers