Code Coverage Determination via Atomic Element Iteration

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing code coverage instrumentation and reporting tools require external modifications to application code, increasing computational and human effort, and do not efficiently determine which portions of the code are executed during testing.

Innovation Solution

A method and system that iteratively test versions of the application code by disabling or removing atomic code elements, classifying them as covered or not covered based on test outcomes, without requiring changes to the code or test, using a processor to execute the code test on multiple iterations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If external stored procedure calls are injected as executable statements into the application code to track code coverage, then code coverage can be measured, but the complexity of the code increases and additional computational overhead is introduced

Engineering Contradiction:
Improvecode coverage measurementVSAvoidcode complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent extracts the code coverage tracking mechanism from the application code itself by using an external debugger and profiler that operate independently of the code being tested. The tracking information is collected externally through debugging interfaces rather than being embedded within the code structure, thus avoiding the complexity increase that would result from injecting stored procedure calls into the application code.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces an intermediary debugger component that acts as a mediator between the application code and the code coverage analysis. This debugger intercepts execution flow and collects coverage information without requiring modifications to the application code, thereby avoiding the complexity overhead of embedding tracking statements directly in the code while still achieving precise measurement.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Loss of information

If path tracing is performed by recording all instructions executed by the tested application, then complete code coverage information is obtained, but the computational overhead and time required for testing increase significantly

Engineering Contradiction:
Improvecode execution informationVSAvoidtesting time
Core Design Contradiction:
Loss of informationVSLoss of time

Solution Approach 1:

The patent applies partial action by selectively tracking only the specific instructions or code paths that are relevant to the test objectives, rather than recording every single instruction executed. The debugger and profiler are configured to monitor and record only the necessary coverage information, reducing the computational overhead and testing time while still obtaining sufficient code coverage data to assess test effectiveness.

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If code coverage analysis is performed using existing instrumentation tools that modify application code, then code coverage can be determined, but additional human effort and computational resources are required for code modification and maintenance

Engineering Contradiction:
Improvecode coverage determinationVSAvoidease of code testing
Core Design Contradiction:
Measurement precisionVSEase of manufacture

Solution Approach 1:

The patent extracts the code coverage determination process from code-modifying instrumentation tools and implements it through an external debugger and profiler that analyze code execution without requiring any modifications to the application code. This eliminates the need for technicians to manually inject tracking statements or manage instrumentation code, significantly reducing human effort while maintaining precise code coverage measurement.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS9934132B2Determining code coverage of an application by test(S)
Publication Date: 2018.04.03 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US9934132B2 patent drawing
  • US9934132B2 patent drawing
  • US9934132B2 patent drawing

AI summary

A method of determining code coverage of an application by test(s) (wherein code may include UI elements). The method comprises executing a code test on at least one portion of a tested code of an application in one or more iterations, wherein in each one of the plurality of iterations, selecting at least one of a plurality of atomic code elements of the tested code, applying the code test on a version of the code that does not include the at least one selected atomic element, and classifying the at least one selected atomic element as covered by the code test when the code test fails and as not covered in the code test when the code test passes.