Microservice Testing Automation via Dependency Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Microservice applications are challenging to test end-to-end, especially in local development environments, due to error-prone processes and the need for continuous integration environments, which can be inaccessible, leading to unanticipated errors and inefficiencies in testing and deployment.

Innovation Solution

The system automatically determines related microservices and executes relevant automated tests within a local development environment, allowing for continuous end-to-end testing without requiring a full end-to-end environment, by analyzing function dependencies and packaging relevant tests and services, enabling validation of microservices and source code changes efficiently.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If continuous integration environments are used for end-to-end testing of microservice applications, then testing coverage is improved, but system complexity and accessibility requirements increase

Engineering Contradiction:
Improvetesting coverageVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the monolithic testing approach into microservice-level testing units. Each microservice is tested independently with its own test suite, allowing testing to be distributed across multiple smaller units rather than requiring a single complex continuous integration environment. This segmentation enables local testing capabilities while maintaining comprehensive coverage.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary layer that packages microservices with their dependent services and test suites together. This intermediary packaging approach allows the system to execute tests locally without requiring access to external continuous integration environments, effectively mediating between the need for comprehensive testing and the constraint of local environment limitations.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If all microservice tests are executed for source code changes, then testing completeness is improved, but testing time and computational resources increase

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

Solution Approach 1:

The patent extracts and identifies only the relevant microservices that are affected by source code changes. By analyzing dependencies and determining which microservices are related to the changed code, the system extracts a minimal subset of tests that need to be executed, eliminating unnecessary tests and reducing overall testing time while maintaining completeness for affected components.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies partial action by executing only the necessary portion of the test suite rather than all tests. The system determines the appropriate scope of testing based on change analysis, performing exactly enough testing to validate the changes without over-testing unrelated microservices, thus optimizing the balance between completeness and efficiency.

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If comprehensive end-to-end testing environments are deployed, then testing accuracy is improved, but resource consumption and deployment complexity increase

Engineering Contradiction:
Improvetesting accuracyVSAvoidcomputational resources
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent applies local quality by configuring testing environments specifically for each microservice's local needs rather than deploying a comprehensive end-to-end environment. Each microservice is tested in its own localized context with only the necessary dependent services packaged together, reducing overall resource consumption while maintaining testing accuracy for each specific service.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent creates localized copies of microservices and their dependent services in the local development environment. These copies include the necessary test suites and configurations, allowing accurate testing to be performed locally without requiring access to or deployment of comprehensive end-to-end testing environments, thus reducing resource consumption while preserving testing validity.

Inventive Principle:
Principle #26Copying

4Ease of operation

If local development environments are used for testing, then accessibility and ease of operation are improved, but testing capability and reliability decrease

Engineering Contradiction:
ImproveaccessibilityVSAvoidtesting capability
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent merges the microservice, its dependent services, and test suites into a single packaged unit that can be executed locally. This merging approach combines all necessary testing components into one self-contained entity, enabling comprehensive testing capability to be available in local development environments without requiring external continuous integration systems, thus maintaining both accessibility and reliability.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent enables the local development environment to perform comprehensive testing independently through self-service capabilities. The packaged microservices include their own test suites and dependencies, allowing the system to execute complete end-to-end tests locally without requiring external testing infrastructure, making the system self-sufficient for testing purposes while maintaining high reliability.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS12061538B2Systems and methods for continuous testing of microservice applications
Publication Date: 2024.08.13 RED HAT LLC
  • US12061538B2 patent drawing
  • US12061538B2 patent drawing
  • US12061538B2 patent drawing

AI summary

The present disclosure provides new and innovative systems and methods for continuous testing of microservice applications. In an example, a computer-implemented method includes obtaining changes to source code, determining at least one related microservice related to the source code, determining at least one related microservice test related to the at least one microservice, executing automated tests to validate the source code, executing the at least one related microservice test to validate the at least one related microservice, generating test outcome data based on the automated tests and the at least one related microservice test, and providing a notification based on the test outcome data.