Detecting XPath Errors in XML Processors with Differential Testing

Discover XPress, an innovative differential testing system for XML processors that identifies logical errors in XPath. Our approach has detected 27 unique errors in six XML processors, improving their robustness and efficiency.

viernes, 7 de marzo de 2025 • 2 min read • Q2BSTUDIO Team

Software-Apps-Company

Extensible Markup Language (XML) is a widely used file format for data storage and transmission. Many XML processors support XPath, a query language that allows extracting elements from XML documents. These systems can be affected by logical errors, which cause the processor to return incorrect results. To address these issues, a new approach materialized in a system called XPress is proposed.

XPress uses differential testing as its validation method, comparing the results of multiple systems on the same test input and detecting errors through discrepancies in their outputs. Additionally, it generates both XML documents and XPath queries to perform these tests. With the goal of producing meaningful queries that yield non-empty results, XPress selects a specific node as a reference in the XPath expression generation process. This ensures that the generated queries always include context related to that node, such as its tag name and attributes, guaranteeing that the applied conditions are met before expanding the query.

Our methodology was tested on six widely used XML processors: BaseX, eXist-DB, Saxon, PostgreSQL, libXML2, and a commercial system. Through these tests, 27 unique errors were identified in these systems, of which 25 were validated by developers and 20 have already been fixed. Furthermore, XPress proved to be efficient, finding 12 errors in BaseX in just 24 hours, twice as fast as random test generation.

At Q2BSTUDIO, a technology development and services company, we understand the importance of quality and security in data processing systems. We adopt advanced testing and development methodologies to ensure our solutions are robust and reliable. With innovative approaches like the one presented in XPress, we continue to strengthen our capabilities to offer our clients optimized and error-free systems. The efficiency and effectiveness of these methods allow us to continuously improve the quality of our projects in the field of data processing and beyond.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.