Source Code Test Consolidation via Overlap Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Executing numerous test suites to test source code consumes a large amount of time and computing resources, making it inefficient, especially when there is a need to quickly deploy a patch to fix errors or flaws in production code, as many test suites have overlapping tests that waste resources and time.
Innovation Solution
A testing component analyzes various test suites to identify overlapping blocks and test cases, merging them automatically to create a consolidated test that covers the same code lines with reduced execution time and resource consumption, using code coverage reports and graph techniques without user interaction.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If numerous test suites are executed to thoroughly test source code, then code coverage and reliability are improved, but execution time and computing resource consumption increase
Solution Approach 1:
The patent merges multiple test suites into a single consolidated test by identifying and executing common code paths once. The testing component analyzes test suites, identifies overlapping code blocks, and creates a merged test that executes common code paths a single time while still achieving comprehensive code coverage, thereby reducing execution time without sacrificing reliability
Solution Approach 2:
The merged test is designed to serve multiple functions simultaneously - it tests multiple code paths and achieves code coverage for multiple original test suites through a single execution. The testing component creates a universal test structure that can validate different code branches and paths without requiring separate executions for each original test suite
2Reliability
If numerous test suites are executed to thoroughly test source code, then code coverage and reliability are improved, but computing resource consumption increases
Solution Approach 1:
The patent merges multiple test suites into a single consolidated test by identifying and executing common code paths once. The testing component analyzes test suites, identifies overlapping code blocks, and creates a merged test that executes common code paths a single time while still achieving comprehensive code coverage, thereby reducing execution time without sacrificing reliability
Solution Approach 2:
The patent discards redundant test executions by identifying and eliminating duplicate or overlapping test cases. The testing component analyzes which code paths are already covered by existing tests and recovers computational resources by not re-executing those paths, thereby reducing overall computing resource consumption while maintaining complete code coverage
3Reliability
If multiple test suites with overlapping tests are executed, then comprehensive code coverage is achieved, but time and resources are wasted on redundant testing
Solution Approach 1:
The patent merges multiple test suites into a single consolidated test by identifying and executing common code paths once. The testing component analyzes test suites, identifies overlapping code blocks, and creates a merged test that executes common code paths a single time while still achieving comprehensive code coverage, thereby reducing execution time without sacrificing reliability
Solution Approach 2:
The patent extracts and eliminates redundant test cases from the original test suites. The testing component identifies overlapping tests and extracts only the necessary unique code paths to be tested, removing duplicate testing operations that waste time and resources while maintaining complete coverage of the source code
Data Source
AI summary
A method includes identifying a set of tests for a source code, analyzing the set of tests to identify overlapping blocks of the source code that are to be tested by each of the set of tests, merging a subset of the tests that include the overlapping blocks of the source code to create a merged test, and causing the merged test to be executed to test the source code. In an implementation, code coverage results are used when analyzing the set of tests to identify overlapping blocks of the source code.


