Call Graph Path Analysis for Targeted Software Testing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current software testing methods lack efficiency in determining the impact of function modifications on application operation, as they do not effectively identify a minimal set of test cases required to validate changes, leading to inefficient resource allocation and prolonged testing processes.

Innovation Solution

A system that collects call stack data, generates call graphs, and identifies short paths and sequences to determine a subset of test cases that provide sufficient coverage for function modifications, allowing for targeted testing and reduced testing scope.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If all test cases are executed to validate function modifications, then testing coverage and reliability are improved, but testing time and resource consumption increase

Engineering Contradiction:
Improvetesting coverageVSAvoidtesting time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent extracts only the necessary test cases from the complete test suite by analyzing call graphs and identifying test cases that directly or indirectly exercise modified functions. This extraction is achieved through: (1) building call graphs to map function relationships, (2) identifying affected functions based on modification notifications, (3) selecting test cases that cover the affected functions and their callers/callees, and (4) excluding test cases that do not contribute to validating the modification. This selective extraction maintains testing reliability while significantly reducing testing time.

Inventive Principle:
Principle #2Taking out (Extraction)

2Reliability

If a comprehensive set of test cases is used, then testing thoroughness is improved, but testing efficiency and productivity deteriorate

Engineering Contradiction:
Improvetesting thoroughnessVSAvoidtesting efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent performs preliminary analysis by pre-building call graphs and pre-identifying test case relationships before actual testing occurs. The system analyzes the application's function call structures, maps dependencies between functions and test cases, and pre-determines which test cases are necessary for validating modifications. This preliminary action enables rapid selection of appropriate test cases when modifications occur, avoiding the need to review all test cases from scratch and thus improving testing efficiency without compromising thoroughness.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If test cases are selected based on function modification impact, then testing precision and focus are improved, but complexity of determining impact increases

Engineering Contradiction:
Improvetesting precisionVSAvoidimpact analysis complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent introduces call graphs as an intermediary data structure that simplifies impact analysis. The call graph serves as a mediator between the modification notification and the test case selection process. Instead of directly analyzing complex function relationships and dependencies, the system uses the pre-computed call graph to quickly identify affected functions and their relationships. This intermediary structure breaks down the complex impact analysis into simpler steps: (1) locate modified function in call graph, (2) identify connected functions (callers/callees), (3) select test cases covering these functions, thereby reducing the perceived complexity while maintaining precision.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10248547B2Coverage of call graphs based on paths and sequences
Publication Date: 2019.04.02 SAP SE
  • US10248547B2 patent drawing
  • US10248547B2 patent drawing
  • US10248547B2 patent drawing

AI summary

Some embodiments provide a program that collects a set of call stack data associated with a set of test cases executed on an application. The program further generates a set of call graphs based on the set of call stack data. Each call graph in the set of call graphs includes a set of nodes representing a set of functions in the application executed in the corresponding test case in the set of test cases. The program also determines, for each call graph in the set of call graphs, a set of short paths and a set of short sequences in the call graph. The program further receives a notification indicating a modification to a function in the application. The program also determines a subset of the set of test cases to test the modification to the function based on the sets of short paths and the sets of short sequences in the set of call graphs.