API Scenario Testing Using Spatial-Temporal Graphs

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvetest accuracyVSAvoidtest efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

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

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

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

Inventive Principle:
Principle #25Self-service

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

Engineering Contradiction:
ImproveapplicabilityVSAvoidtest period
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

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

Inventive Principle:
Principle #15Dynamics

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

Inventive Principle:
Principle #23Feedback

3Reliability

If comprehensive scenario-based testing is performed, then test coverage is improved, but test complexity increases due to multiple scenario definitions and frameworks

Engineering Contradiction:
Improvetest coverageVSAvoidtest complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

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

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

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

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS20250378013A1Software test method and apparatus
Publication Date: 2025.12.11 HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
  • US20250378013A1 patent drawing
  • US20250378013A1 patent drawing
  • US20250378013A1 patent drawing

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.