Code Coverage Plugin Injected Into Class Loader

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current software testing methods require specialized knowledge and environments, making it difficult for non-expert users to perform code coverage testing, which can lead to complex configurations and increased risk of human errors, especially in diverse and complex customer ecosystems.

Innovation Solution

A code coverage plugin is provided that allows users to perform testing without requiring a special IDE or development kit, enabling any user to upload data for testing and collect results, with features like starting/stopping code coverage, collecting data, and viewing results through a user interface or API, thereby simplifying the testing process and reducing the need for expert intervention.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If code coverage testing is performed using traditional methods with special IDEs or development kits, then code coverage data can be collected, but the system complexity and configuration requirements increase significantly

Engineering Contradiction:
Improvecode coverage data collectionVSAvoidtesting environment configuration
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts the code coverage testing functionality from the complex special IDEs or development kits and integrates it directly into the application under test. This is achieved by injecting a code coverage plugin into the application's class loader, which allows coverage data collection without requiring separate specialized testing environments or complex configurations.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The application's class loader is given multiple functions: its original role of loading application classes, plus the additional role of loading and managing the code coverage plugin. This multi-functionality eliminates the need for separate specialized testing tools while maintaining code coverage capabilities, thereby reducing system complexity.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Measurement precision

If code coverage testing requires specialized knowledge and environments, then accurate testing can be performed, but the ease of operation decreases for non-expert users

Engineering Contradiction:
Improvetesting accuracyVSAvoiduser accessibility
Core Design Contradiction:
Measurement precisionVSEase of operation

Solution Approach 1:

The application performs code coverage testing on its own through the injected plugin, without requiring external specialized testing tools or expert configuration. The plugin integrates seamlessly with the application's existing class loading mechanism, allowing any user to initiate and collect code coverage data using the application's native capabilities, thereby improving ease of operation while maintaining testing accuracy.

Inventive Principle:
Principle #25Self-service

3Reliability

If traditional code coverage tools are used, then comprehensive testing can be achieved, but the risk of human errors increases due to complex configurations

Engineering Contradiction:
Improvetesting completenessVSAvoidhuman error risk
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The code coverage plugin acts as an intermediary between the application and the code coverage testing mechanism. It integrates into the application's class loader and automatically manages the instrumentation and data collection processes, eliminating the need for users to perform complex manual configurations that could lead to human errors, while still achieving comprehensive testing coverage.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS9703677B2Code coverage plugin
Publication Date: 2017.07.11 RED HAT ISRAEL
  • US9703677B2 patent drawing
  • US9703677B2 patent drawing
  • US9703677B2 patent drawing

AI summary

A method for starting a level of testing on a first package file is disclosed. The method receives, via an application programming interface, at a plugin, a request to start the level of testing on the first package file. The method further modifies, by the plugin, the memory data structure utilized for the testing in middleware, to register a code coverage tool used to perform the testing at the level on the first package file. The method further launches the code coverage tool to start the level of testing by replacing the first package file with the second package file that has been modified and instrumented by the code coverage tool. The method further adds the code coverage tool as a dependency for the second package file.