Automated Test Input Generation for Microservice Integration

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Microservice-based applications pose challenges in testing due to runtime heterogeneity and high code churn, with existing tools being unsuitable for distributed, polyglot environments, and requiring automated and efficient generation of test inputs to handle frequent updates and failures.

Innovation Solution

A system and method for automatically generating test inputs by traversing the user interface of a microservices-based application, analyzing user interface event sequences, and determining API call sets, which then generate test inputs to emulate failure scenarios and cover API call graphs, independent of application code and runtime.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If existing testing tools are used for microservice-based applications, then testing can be performed with conventional methods, but the tools are unsuitable for distributed polyglot environments and cannot handle runtime heterogeneity and high code churn

Engineering Contradiction:
Improvesuitability for distributed polyglot environmentsVSAvoidhandling runtime heterogeneity and code churn
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The system creates a virtual model of the application by crawling the user interface and generating a virtual document object model that replicates the application's structure and behavior. This virtual copy can be tested independently without requiring the actual runtime environment, thus resolving the issue of tool suitability for distributed polyglot environments while maintaining reliability across runtime heterogeneity and code churn scenarios

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The system introduces a user interface crawling component as an intermediary between the tester and the microservice application. This intermediary captures user interactions through the UI and translates them into test inputs, eliminating the need for direct integration with the complex distributed microservice infrastructure and enabling reliable testing across heterogeneous runtime environments

Inventive Principle:
Principle #24Intermediary (Mediator)

2Manufacturing precision

If manual test input generation is performed, then test coverage can be carefully designed, but processing time and resource usage increase significantly

Engineering Contradiction:
Improvetest coverage accuracyVSAvoidprocessing time and resource usage
Core Design Contradiction:
Manufacturing precisionVSProductivity

Solution Approach 1:

The system enables automated self-service test input generation by crawling the user interface, analyzing event sequences, and automatically generating test inputs that meet coverage criteria. This eliminates manual test design while maintaining coverage accuracy through automated analysis of user interaction patterns and API call relationships

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system implements feedback loops where test execution results are analyzed to identify uncovered API calls, which then generate new test inputs targeting the uncovered areas. This automated feedback mechanism ensures comprehensive coverage while reducing processing time by focusing only on untested code paths rather than exhaustive manual testing

Inventive Principle:
Principle #23Feedback

3Manufacturing precision

If comprehensive test coverage is pursued to cover all API call graphs, then testing thoroughness improves, but redundancy increases and resource consumption grows

Engineering Contradiction:
ImproveAPI call graph coverageVSAvoidtesting redundancy
Core Design Contradiction:
Manufacturing precisionVSLoss of substance

Solution Approach 1:

The system applies partial action by generating test inputs that target only the specific API calls and code paths that are currently uncovered, rather than exhaustively testing all possible paths. This approach achieves comprehensive coverage over time while minimizing redundancy by focusing testing efforts only where needed based on previous test results

Inventive Principle:
Principle #16Partial or excessive action

4Productivity

If automated test input generation is implemented, then productivity and efficiency improve, but the system must handle runtime heterogeneity and high code churn in microservice environments

Engineering Contradiction:
Improveautomated testing efficiencyVSAvoidhandling runtime heterogeneity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system segments the testing process into distinct components: UI crawling, event sequence analysis, test input generation, and result analysis. Each component handles a specific aspect of the testing workflow independently, making the overall system more manageable and adaptable to runtime heterogeneity while maintaining high automated testing efficiency

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system creates a universal testing framework that operates through the user interface layer, which is common across different microservice implementations regardless of their runtime heterogeneity. The virtual document object model serves as a universal representation that can capture and test applications with different technologies and deployment configurations, enabling automated efficiency without being constrained by specific runtime environments

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

Data Source

PatentUS11640350B2Automated test input generation for integration testing of microservice-based web applications
Publication Date: 2023.05.02 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11640350B2 patent drawing
  • US11640350B2 patent drawing
  • US11640350B2 patent drawing

AI summary

Techniques for automated generation of inputs for testing microservice-based applications. In one example, a computer-implemented method includes: traversing, by a system operatively coupled to a processor, a user interface of a microservices-based application by performing actions on user interface elements of the user interface; and generating, by the system, an aggregated log of user interface event sequences and application program interface call sets based on the traversing. The computer-implemented method also includes: determining, by the system, respective user interface event sequences that invoke the application program interface call sets; and generating, by the system, respective test inputs based on the respective user interface event sequences that invoke the application program interface call sets.