In-Memory Test Copy for Stateful Service Replay Testing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Replay testing for stateful cloud-based services is challenging due to the need for accurate execution states, which may be overwritten in production databases, and the cost and scalability issues of maintaining full-scale test databases.
Innovation Solution
A service testing system that creates an in-memory test copy of the execution state for stateful requests, allowing the compute engine to execute requests without impacting production data, and uses mocked execution states to support concurrent test runs, enabling consistent replay of requests.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If production database is used for replay testing, then execution state is available, but production data is overwritten and live execution state is impacted
Solution Approach 1:
The patent creates a copy of the execution state from the production database into a test database before replay testing. This copy contains the necessary state information (e.g., cart contents, browsing history, order details) without affecting the original production data. The test database serves as an isolated environment where replay tests can be performed safely.
2Reliability
If full-scale test database is maintained for testing, then replay testing can be performed, but cost increases significantly
Solution Approach 1:
The patent extracts only the necessary execution state data from the production database into a separate test database, rather than maintaining a full-scale copy of the entire production environment. This selective extraction includes only the state information required for replay testing (such as customer cart data, order history, and browsing information) while excluding unnecessary data, thereby reducing storage costs and resource requirements.
3Quantity of substance
If single test database is used, then resource usage is reduced, but scalability is limited for concurrent test runs
Solution Approach 1:
The patent segments the test database into multiple isolated test databases, each capable of holding execution state for different test scenarios or customers. This segmentation allows multiple replay tests to run concurrently without interfering with each other, as each test can use its own dedicated test database or a specific subset of the segmented databases.
4Object-affected harmful factors
If execution state is copied to test database, then production data is protected, but system complexity increases
Solution Approach 1:
The patent performs the execution state copy operation as a preliminary action before replay testing begins. The system automatically captures the current execution state from the production database and stores it in the test database in advance, so that when replay testing is initiated, the necessary state data is already available. This eliminates the need for complex real-time data synchronization mechanisms during testing.
Data Source
AI summary
A service testing system is disclosed to enable consistent replay of stateful requests on a service whose output depends on the service's execution state prior to the requests. In embodiments, the service implements a compute engine that executes service requests and a storage subsystem that maintains execution states during the execution of stateful requests. When a stateful request is received during testing, the storage subsystem creates an in-memory test copy of the execution state to support execution of the request, and provides the test copy to the compute engine. In embodiments, the storage subsystem will create a separate instance of execution state for each individual test run. The disclosed techniques enable mock execution states to be easily created for testing of stateful requests, in a manner that is transparent to the compute engine and does not impact production execution data maintained by the service.


