Static Analysis for Software Test Case Selection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing software testing methods require running a large number of test cases after changes to software modules, which is inefficient and adds substantial overhead, especially in development projects with frequent code changes, as they rely on dynamic analysis and execution traces.
Innovation Solution
The method involves generating reference data through static analysis of the software application's instructions to identify the optimal set of test cases by determining which modules reference the changed modules, both directly and indirectly, allowing for the identification of necessary test cases without executing the modified application.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If dynamic analysis and execution traces are used to identify test cases, then test case identification can be performed, but the overhead and time required for testing increases substantially
Solution Approach 1:
The system performs static analysis of the software application to pre-determine module dependencies and reference relationships before changes are made. This preliminary identification of which modules reference changed modules allows the system to prepare and select appropriate test cases in advance, eliminating the need for time-consuming dynamic execution traces during the testing process.
Solution Approach 2:
The patent replaces dynamic analysis mechanisms (which require executing the application and tracing runtime behavior) with static analysis mechanisms (which examine code structure, instructions, and dependencies without execution). This substitution eliminates the mechanical process of running the application to generate execution traces, significantly reducing testing overhead while maintaining accurate test case identification.
2Reliability
If a large number of test cases are run after module changes, then comprehensive testing is achieved, but development productivity decreases
Solution Approach 1:
The system extracts and identifies only the specific test cases that are necessary to verify changes to particular modules. By analyzing which modules reference the changed modules, the system extracts only the relevant subset of test cases from the entire test suite, eliminating unnecessary tests and focusing testing efforts only on what is actually affected by the changes.
Solution Approach 2:
The patent applies local quality by tailoring the testing approach to the specific context of each module change. Instead of uniformly running all test cases, the system determines which test cases are locally relevant to the changed modules based on reference relationships, ensuring that testing is both comprehensive enough to catch bugs and efficient enough to maintain development productivity.
3Reliability
If all test cases are executed after changes, then all potential issues can be detected, but unnecessary testing overhead is incurred
Solution Approach 1:
The system applies partial action by executing only the necessary portion of the test suite rather than all test cases. By identifying which modules reference the changed modules, the system determines the minimal set of test cases needed to detect potential issues, avoiding the excessive action of running unnecessary tests that would waste computational resources and time.
Data Source
AI summary
An aspect of the present invention facilitates identification of test cases to be run after changes to modules of a software application. In one embodiment, a reference data is generated by inspecting the instructions (static analysis) forming the modules of the software application, with the reference data specifying a corresponding set of modules in the application that are referenced by each of the modules in the application. The reference data is then examined to find a referencing set of modules which reference any of the changed modules either as immediate reference or multi-level reference through other modules. Test cases invoking any of the modules in the referencing set are identified as suitable test cases to be run.


