API Test Oracle and Dependency Graph for Automated Defect Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current API test methods are ineffective and have a limited automation level, hindering efficient detection of defects in application programming interfaces.
Innovation Solution
An API test method and apparatus that automatically generates and executes test cases using an API operation relationship graph and a test oracle, iteratively refining the dependency relationships and parameter constraints to enhance testing accuracy and efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Extent of automation
If traditional API test methods are used, then manual testing can be performed, but automation level is limited and test efficiency is low
Solution Approach 1:
The system automatically generates test cases, executes tests, and produces reports without human intervention. The API test apparatus autonomously parses API definition documents, generates operation relationship graphs, creates test cases, executes them against the API, and generates test reports, eliminating the need for manual test design and execution while significantly improving test efficiency
Solution Approach 2:
The patent replaces manual mechanical testing processes with an automated computational system. Instead of manual test case design and execution, the system uses automated parsing, graph generation, and test execution mechanisms that substitute human operations with machine-based processes, thereby increasing both automation level and test efficiency
2Reliability
If comprehensive API testing is performed, then defect detection capability improves, but test complexity increases
Solution Approach 1:
The patent segments the API testing process into distinct phases: parsing the API definition document, generating an operation relationship graph, creating test cases from the graph, executing tests, and generating reports. This segmentation breaks down the complex comprehensive testing task into manageable automated steps, improving defect detection capability while keeping the overall process organized and controllable
Solution Approach 2:
The operation relationship graph serves as an intermediary structure between the API definition document and the test cases. It captures the dependency relationships and operation sequences in a structured format that facilitates automated test case generation, thereby enabling comprehensive testing without directly managing the full complexity of API interactions
Data Source
AI summary
In a method of application programming interface (API) testing, a computing device obtains an API file transmitted by a user, parses the API file, and generates an API operation relationship graph and a test oracle. The computing device generates a first test case set based on the API operation relationship graph, and triggers a service node to execute a test case in the first test case set. The computing device obtains an API request initiated in a process of executing the test case in the first test case set and a corresponding API response, and provides the user with a matching status between the test oracle and the API request initiated in the process of executing the test case in the first test case set and the API response.


