Predictive Model for Web API Regression Testing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Regression testing of web applications is challenging due to the frequent changes in web applications, making it difficult to identify functional degradation in APIs caused by code modifications, especially as the number of functions and scenarios increases, requiring efficient methods to simulate API requests and verify responses across various production environments.
Innovation Solution
A method involving training a predictive model with network traffic and data change messages from a production environment to predict data changes in an upgraded web application, replaying network traffic to generate real data changes, and comparing predicted changes with actual changes to identify potentially degraded APIs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If traditional regression testing methods are used to test all APIs in upgraded web applications, then comprehensive coverage is achieved, but testing time and computational resources increase significantly
Solution Approach 1:
The patent creates a virtual copy of the production environment including the web application, database, and network traffic. This virtual environment allows regression testing to be performed on upgraded versions without requiring extensive manual test case creation and execution, significantly reducing testing time while maintaining comprehensive coverage through automated traffic replay
Solution Approach 2:
The patent performs preliminary actions by capturing and storing network traffic and data changes from the production environment before upgrades occur. This pre-captured data is then used as input for automated regression testing after upgrades, eliminating the need to recreate test scenarios and reducing testing time while ensuring comprehensive API coverage
2Adaptability or versatility
If the number of functions and scenarios in web applications increases, then application capability improves, but identifying functional degradation in APIs becomes more difficult
Solution Approach 1:
The patent implements feedback mechanisms by automatically comparing API responses from upgraded versions against expected outcomes derived from production traffic replay. The system provides immediate feedback on which APIs have degraded functionality, making it easy to identify issues even as the number of functions and scenarios increases
Solution Approach 2:
The testing system performs self-service by automatically generating test cases from captured production traffic, executing them against upgraded applications, and identifying functional degradation without human intervention. This automation scales efficiently regardless of the increasing number of API functions and scenarios
3Productivity
If code modifications are made frequently for bug fixes and enhancements, then application improvement speed increases, but the complexity of ensuring API functionality across versions increases
Solution Approach 1:
The patent implements periodic regression testing automatically triggered by each code modification or version upgrade. This periodic execution of traffic replay and API comparison ensures that every version change is validated against production behavior, managing version complexity systematically while maintaining high release frequency
Solution Approach 2:
The testing system performs multiple functions using a unified approach: it captures production traffic, creates virtual environments, replays traffic against upgraded versions, compares API responses, and generates reports. This universal testing framework handles all version management and API validation needs across multiple releases, reducing overall system complexity
Data Source
AI summary
Training a predict model with network traffic and data change messages generated by an existing web application running in a production environment. The predict model being is trained to predict data changes resulted from API calls embodied in network traffic. A stream of network traffic of the existing web application is replayed with an upgraded version of the existing web application to generate real data changes. The stream of network traffic is applied to the predict model to generate predicted data change messages. The predicted data change messages are comparing with real data change messages representing the real data changes. One or more existing APIs is identified as being possibly functionally degraded based on any inconsistency of the predicted data change messages with the real data change messages.


