arXiv:2611.07754cs.SENov 2026

Manuscript Offprint

arXiv:2611.07754

Uncovering Systematic Blind Spots in Graph Database Testing through Integration and Process-Level Analysis

Tinghan Li, Aoyang Fang, Longbin Lai, Zifan Xie, Hongbo Zhao, Yu Shao, Ying Zhang, Pinjia He

TINGHAN LI, The Chinese University of Hong Kong, Shenzhen, China

AOYANG FANG, The Chinese University of Hong Kong, Shenzhen, China

LONGBIN LAI, Alibaba Group, China

ZIFAN XIE, Chongqing University, China

HONGBO ZHAO, Beijing University of Posts and Telecommunications, China

YU SHAO, Alibaba Group, China

YING ZHANG, Zhejiang Gongshang University, China

PINJIA HE, The Chinese University of Hong Kong, Shenzhen, China

Graph databases are becoming foundational infrastructure for connected data, and a growing body of automated testing techniques has uncovered many bugs across mature graph database systems. Each technique checks a different aspect of correctness and exposes a different class of defect. Combining them is the natural next step, but each technique is judged by the real bugs it finds, not by useless reports or tests that can never fail, and that is what decides whether a developer can afford to fix the problems.

To identify the remaining gaps, we integrated test capabilities from 8 testing methods and conducted an empirical study of their behavior, during which we found two blind spots. First, 12 hours of testing produce thousands of bug reports, far more than the number of genuine defects a mature database is likely to contain. Most reports are false positives caused by dialect or pattern-matching differences, and many of the remaining reports are duplicates. Second, analysis of process-level data reveals that many equivalence-based metamorphic test cases lose their ability to detect defects because of the optimization mechanism.

Based on these findings, we summarize and realize these guidelines in GraphWeave, an integrated testing platform for graph databases. This includes a multi-agent system that analyzes the flood of bug reports to produce gating rules for issue filtering and adapter rules for dialect adaptation, and a plan-aware triage routes metamorphic pairs by plan, skipping those that share a plan on the same graph state and therefore cannot detect defects. We apply GraphWeave to NeuG, a recently open-sourced industrial graph database that has not been covered by prior graph database testing work. With modest manual effort, GraphWeave uncovers 19 previously unknown bugs, all of which have since been confirmed.

CCS Concepts: • Software and its engineering → Software testing and debugging; • Information systems → Database management system engines.

Additional Key Words and Phrases: graph databases, database testing

Author preprint. Submitted to ACM Transactions on Software Engineering and Methodology; not yet peer reviewed or accepted.

1 Introduction

Graph databases are widely used for managing highly connected data, including social networks, recommendation systems, fraud detection, and knowledge graphs [2, 14, 32]. Reflecting this demand, new systems continue to appear: as of this writing, the CMU Database of Databases [27] lists 26

Authors' Contact Information: Tinghan Li, 225045006@link.cuhk.edu.cn, School of Data Science, The Chinese University of Hong Kong, Shenzhen, Shenzhen, China; Aoyang Fang, aoyangfang@link.cuhk.edu.cn, The Chinese University of Hong Kong, Shenzhen, Shenzhen, China; Longbin Lai, longbin.lai@gmail.com, Alibaba Group, Hangzhou, China; Zifan Xie, xzff@cqu.edu.cn, Chongqing University, Chongqing, China; Hongbo Zhao, hongbozhao72@gmail.com, Beijing University of Posts and Telecommunications, Beijing, China; Yu Shao, yu.shao@alibaba-inc.com, Alibaba Group, Hangzhou, China; Ying Zhang, yingz.au@gmail.com, Computer Science and Engineering, Zhejiang Gongshang University, Hangzhou, China; Pinjia He, hepinjia@cuhk.edu.cn, School of Data Science, The Chinese University of Hong Kong, Shenzhen, Shenzhen, China.

graph database systems first released since 2021. Each of these new systems must be tested for correctness before it can be relied upon.

Driven by this demand, researchers have developed a range of automated testing techniques for graph databases. These techniques rely on different test oracles, which are mechanisms for determining whether a test has passed or failed. The kinds of correctness they check can differ substantially: some compare the results that independent systems return for the same query [15], while others check, within a single system, whether write operations leave the graph in the expected state [19]. Different methods therefore expose different classes of defects [19, 21]. Combining them is the natural next step, yet no prior work has run these methods together, and their combined behavior remains unknown. Each technique is judged by the real bugs it finds, not by useless reports or tests that can never fail, and that is what decides whether a developer can afford to fix the problems. To identify the remaining gaps, we integrate eight methods [15, 17–19, 21, 22, 40, 45] behind a shared interface, record process-level data for each test, and study what these methods report and why. The study reveals two blind spots of existing testing methods; Figure 1 previews the three mechanisms behind them.

Blind spot 1: Most raw reports are false positives or duplicates. A twelve-hour run of the integrated methods on Neo4j, Memgraph [23], and FalkorDB, three mature graph databases, produced more than four thousand raw reports, a volume far exceeding the number of genuine defects these mature systems are likely to contain. After inspecting these reports with experts, we found that most reports are false positives. Although false positives have several sources, two classes are especially important for integrated testing. The first is dialect incompatibility, which arises when graph database systems use different syntax to express the same query semantic. As Figure 1(a) shows, test cases originally designed for one system are therefore rejected by another and recorded as raw reports. Prior methods adapt to a target system's dialect through substantial manual effort. The second arises from differences in the semantic constraints of pattern matching [1], the core operation of graph queries. Systems may make different but permissible choices for unspecified semantics, such as whether an edge may be bound by multiple variables within one match. An oracle built around one choice then produces false positives on a system that makes another. Figure 1(b) shows one such case. On a graph with one node and one self-loop, the same pattern returns one row on FalkorDB [8] but zero on Neo4j [24], because FalkorDB permits this reuse of an edge while Neo4j does not. Such a false positive can be hard to distinguish from a genuine defect without graph-database domain knowledge. After false positives are filtered, the remaining reports still number in the hundreds. Many are redundant because multiple test cases trigger the same underlying bug. In one campaign, 278 reports remained after 249 false positives were removed, but all 278 pointed to the same bug. Separating the few real defects from this noise still demands substantial manual effort.

Blind spot 2: Many metamorphic tests cannot detect defects. Methods based on equivalence metamorphic relations generate a semantics-preserving variant of each query and check whether both return the same result. Query optimization mechanism, however, is designed to erase exactly such surface differences and often compiles both queries to the same plan, as shown in Figure 1(c). When both queries are executed against the same graph state and compile to the same plan, their results are identical by construction, so such a test cannot reveal a defect and only consumes testing resources. Worse, if that shared plan contains a bug, both queries return the same incorrect result, and the oracle remains silent.

The problems these blind spots cause recur across testing methods and point to concrete guidelines for integrated testing. We realize these guidelines through the following designs.

Uncovering Systematic Blind Spots in Graph Database Testing through Integration and Process-Level Analysis

3

Figure

(a) Dialect differences

(b) Semantic differences

(c) Plan collapse

Fig. 1. Three fundamental challenges for graph database testing with existing methods: (a) dialect differences, (b) semantic differences, and (c) plan collapse.

Postprocessing pipeline for noise reduction. The study shows that in semantic regions where systems may validly differ, cross-system disagreement alone is weak bug evidence, while intra-system contradiction across equivalent forms provides stronger evidence of a real defect. This finding guides us to preserve and analyze process-level data, so that self-contradiction can be detected and false positives attributed to their underlying semantic assumptions. We realize this with a postprocessing pipeline. In this pipeline, reports are clustered by root cause, and representative cases are analyzed by a multi-agent LLM system with skills that encode findings from the study. Each confirmed disposition triggers a corresponding feedback action. The pipeline updates the target adapter for dialect false positives and registers gate rules for confirmed bugs and duplicates to suppress repeated analysis.

Plan-aware triage for skipping powerless pairs. The study shows that 5% to 34% of comparable equivalence-based metamorphic pairs compile to the same execution plan on the same graph state, at which point their results are identical by construction and the oracle has no power. This finding guides us to identify same-plan pairs before result execution. We realize this with a triage scheme that collects and compares plan hashes. Same-plan pairs are skipped before result execution. Pairs with different plans but identical results may indicate missed optimization opportunities or performance issues. Pairs with different plans and different results provide potential evidence of a logic bug and are passed to the postprocessing pipeline.

GraphWeave combines the initial integration framework with these two designs. The resulting end-to-end platform supports test construction, dialect adaptation, report postprocessing, and process-level analysis. Together, these components make testing new graph databases practical with modest computational and human resources. We apply GraphWeave to NeuG [12], a recently open-sourced industrial graph database not covered by prior graph database testing work, and uncover 19 previously unknown bugs, all since confirmed.

We make the following contributions.

  • An empirical study of integrated graph database testing. We integrate eight methods behind one interface and conduct an empirical study of their behavior, uncovering two blind spots of existing testing methods.

  • Guidelines for integrated graph database testing. We summarize these findings as guidelines for separating false positives from real bugs and triaging powerless metamorphic pairs.

  • Realizing the guidelines in GraphWeave. We build GraphWeave to realize these guidelines and apply it to NeuG, uncovering 19 previously unknown bugs, all since confirmed. The distribution of these bugs shows the value of integration, as no single method finds more than half.