Regression Testing via Database Snapshot Replay

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Regression testing of software applications that interact with external sources, such as databases, is challenging due to the complexity of interactions and the need to restore the database to a known state for each test, making it difficult to determine if the application's behavior has regressed after modifications.

Innovation Solution

A system that monitors and records interactions between a software application and its data storage during the first run, allowing for a replay of these interactions during a second run with recorded input data, enabling comparison of output data to evaluate if the application has passed the regression test, while also allowing for modifications to the application or environment between runs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the database is restored to a known state at the start of each test, then the application can be tested against consistent data, but the testing process becomes time-consuming and complex

Engineering Contradiction:
Improveconsistency of test dataVSAvoidtime to restore database state
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent creates a copy of the database state (snapshot) at the beginning of the test rather than restoring the actual database. This snapshot is stored and reused for replay testing, eliminating the time-consuming restoration process while maintaining data consistency for regression testing purposes.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The database state is captured and stored in advance (at the start of the first test run) before the actual testing begins. This preliminary action creates a reusable snapshot that can be quickly loaded for subsequent replay tests, avoiding repeated restoration operations.

Inventive Principle:
Principle #10Preliminary action

2Device complexity

If custom-built software scripts are used to simulate a database, then the testing complexity is reduced, but the ability to test interactions with actual external sources is limited

Engineering Contradiction:
Improvecomplexity of testing setupVSAvoidability to test with actual databases
Core Design Contradiction:
Device complexityVSAdaptability or versatility

Solution Approach 1:

The patent introduces a snapshot intermediary layer that mediates between the application under test and the actual database. The snapshot acts as a controlled interface, providing the benefits of simplified testing while maintaining the ability to interact with real database structures and data, thus bridging the gap between simulation and actual testing.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If the database state is captured and stored for replay testing, then the testing process is simplified, but additional storage resources are required

Engineering Contradiction:
Improveefficiency of regression testingVSAvoidstorage space for database snapshots
Core Design Contradiction:
ProductivityVSVolume of stationary object

Solution Approach 1:

The patent extracts only the necessary database state information (snapshot) required for regression testing rather than storing the entire database. This selective extraction captures only the relevant data and state information needed to replay tests, significantly reducing storage requirements while maintaining testing effectiveness.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS8386852B2Automated recording and replaying of software regression tests
Publication Date: 2013.02.26 CONUNDRUM IP LLC
  • US8386852B2 patent drawing
  • US8386852B2 patent drawing
  • US8386852B2 patent drawing

AI summary

A method of regression testing a software application in an execution environment is disclosed. The software application interacts with a data storage and is run a first time. While running the software application for the first time, interactions of the software application with the data storage are monitored. Also while running the software application for the first time, first output data written from the software application to the data storage are recorded, and input data received by the software application from the data storage are recorded. The software application is run a second time after the first time. While running the software application the second time, when the software application calls for data from the data storage, at least a portion of the recorded input data is provided to the software application, and, when the software application writes data to the data storage, second output data written by the software application are recorded. The second output data are compared with the first output data to evaluate whether the software application has passed the regression test.