API Scenario Testing Using Spatial-Temporal Graphs
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current scenario-based testing on cloud platforms is inefficient and inaccurate due to reliance on subjective test case compilation by personnel, leading to long test periods and poor applicability, especially with changing user application scenarios.
Innovation Solution
A method and apparatus that utilize an API calling sequence to generate a spatial-temporal graph, identify user scenarios, and automatically generate test cases, eliminating redundant scenarios through duplicate API link detection and AI parsing, enabling efficient and accurate scenario-based testing.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If manual test case compilation by personnel is used, then test cases can be created based on experience, but test accuracy and efficiency are poor due to subjectivity
Solution Approach 1:
The patent replaces the manual mechanical process of test case compilation with an automated system that uses spatial-temporal graphs and AI algorithms to generate test cases objectively, eliminating human subjectivity and improving both test accuracy and efficiency
Solution Approach 2:
The system enables self-service by automatically generating test cases from API calling sequences without requiring manual intervention, allowing the testing process to serve itself through automated scenario identification and test case creation
2Adaptability or versatility
If manual re-analysis and sorting are performed when user scenarios change, then test cases can be updated, but test period becomes long and applicability is poor
Solution Approach 1:
The patent implements dynamics by making the test case generation process adaptive to changing user scenarios through automated monitoring of API calling sequences, allowing the system to dynamically adjust and regenerate test cases without manual re-analysis
Solution Approach 2:
The system uses feedback from monitored API calling sequences to automatically detect scenario changes and trigger regeneration of test cases, creating a closed-loop system that continuously adapts to changing user scenarios without extending the test period
3Reliability
If comprehensive scenario-based testing is performed, then test coverage is improved, but test complexity increases due to multiple scenario definitions and frameworks
Solution Approach 1:
The patent applies universality by creating a unified spatial-temporal graph framework that can handle multiple scenario definitions and frameworks through a single automated generation process, reducing test complexity while maintaining comprehensive coverage
Solution Approach 2:
The system segments the complex testing process into distinct components: API sequence monitoring, spatial-temporal graph construction, scenario identification, and test case generation, making the overall complex process more manageable and automatable
Data Source
AI summary
Embodiments of this application disclose a software test method, to improve test efficiency of scenario-based testing. The method in embodiments of this application includes the following: A computing device obtains an application programming interface API calling sequence on a cloud platform, where the API calling sequence includes API calling records sorted by time on the cloud platform, and the API calling records include names of APIs called by the computing device at different times; generates a spatial-temporal graph based on the API calling sequence, where the spatial-temporal graph includes a calling relationship between a plurality of APIs and calling times; identifies, based on the spatial-temporal graph, at least one user scenario corresponding to the API calling sequence, and generates a test case corresponding to the at least one user scenario; and performs software testing based on the test case.


