Dynamic REST API Consistency Verification via Tracing Data Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
It is challenging to verify the consistency of microservice functionality with OpenAPI definitions in REST APIs due to the extensive manual effort required to test and validate large numbers of API calls and responses.
Innovation Solution
A dynamic test analyzer accesses tracing data from test cases executed on a target system with microservices configured according to a REST API, calculates coverage metrics, and determines necessary testing actions based on these metrics to ensure API consistency, reducing manual effort by analyzing API calls and responses against the OpenAPI definition.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If manual testing is used to verify API consistency with OpenAPI definitions, then testing accuracy can be maintained, but testing time and manual effort increase significantly
Solution Approach 1:
The patent creates a virtual copy of the OpenAPI definition and uses it to generate automated test cases that replicate manual testing scenarios. The tracing data captures API calls as they occur in production, creating a copy of real-world usage patterns that can be analyzed automatically without requiring manual re-testing
Solution Approach 2:
The patent replaces the mechanical manual testing process with an automated analysis system that uses tracing data and algorithmic comparison. Instead of manually calling APIs and comparing results, the system automatically captures tracing data and uses computational methods to verify consistency with OpenAPI definitions
2Reliability
If comprehensive API testing is performed to ensure coverage of all REST APIs, then API consistency verification improves, but testing complexity and resource requirements increase
Solution Approach 1:
The patent extracts only the necessary information from tracing data - specifically the API call signatures, parameters, and responses - and separates this from the complex microservice execution environment. By extracting only the relevant testing data needed for OpenAPI verification, the system avoids the complexity of managing full end-to-end microservice testing while maintaining verification reliability
Solution Approach 2:
The tracing data collection mechanism serves multiple functions: it captures API calls for consistency verification, collects performance metrics, and provides debugging information. This multi-functional approach consolidates multiple testing and monitoring activities into a single data collection process, reducing overall system complexity
3Manufacturing precision
If manual effort is used to call and validate large amounts of REST APIs, then detailed API verification is possible, but productivity decreases
Solution Approach 1:
The patent performs preliminary capture of tracing data during normal system operation before formal testing begins. This pre-captured data is then available for immediate automated analysis, eliminating the need to manually execute each API call during the verification phase and significantly increasing testing throughput while maintaining detailed validation capability
Solution Approach 2:
The system uses the microservices' own operational tracing data to perform self-verification against OpenAPI definitions. Instead of requiring external manual testing resources, the system leverages data already generated by the microservices during normal operation, enabling automated verification that scales with system activity rather than requiring additional manual effort
Data Source
AI summary
A testing method accesses tracing data comprising a plurality of tracing records corresponding to a plurality of test cases executed on a target system. The target system includes a plurality of microservices configured in accordance with a REST API. A dynamic test analyzer accesses the tracing data and imports a definition of the REST API. The analyzer checks each tracing record for consistency with the API definition. Based on this checking of the tracing records, one or more coverage metrics may be calculated. If any one or more of the one or more coverage metrics fails to exceed a threshold coverage, a testing action may be required. In some cases, the testing action may be selected from either seeking additional coverage of the APIs included in the target system or seeking additional test result coverage.

