Automated Test Input Generation for Microservice Integration
Find Innovative SolutionsGenerate 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
Engineering 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
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
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
2Manufacturing precision
If manual test input generation is performed, then test coverage can be carefully designed, but processing time and resource usage increase significantly
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
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
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
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
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
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
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
Data Source
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.


