Test-Assisted API Learning for Specification Accuracy

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Machine-readable API specifications often contain errors, extracting both correct and incorrect information from API documentation, which limits their effectiveness in enabling seamless interactions with native API systems.

Innovation Solution

A test-assisted API learning method that generates a machine-readable API specification using a machine learning process and regular expression processes, compares it with other specifications, generates API test inputs, and receives feedback to refine the specification, improving its accuracy and correctness.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If machine learning and regular expression processes are used to generate machine-readable API specifications, then the automation and productivity are improved, but errors in extracted information increase

Engineering Contradiction:
Improveautomation of API specification generationVSAvoidaccuracy of extracted API information
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system implements feedback by calling the native API system with generated test inputs and using the responses to identify errors in the machine-readable API specification. The feedback loop continuously refines the specification by comparing expected outputs with actual API responses, correcting extracted information iteratively

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system performs self-correction by automatically generating test cases, executing them against the native API, and using the results to identify and correct errors in the extracted specification without human intervention. The machine learning model self-improves through automated testing and feedback

Inventive Principle:
Principle #25Self-service

2Ease of operation

If machine learning processes extract information from API documentation, then the ease of operation is improved, but measurement precision deteriorates

Engineering Contradiction:
Improveautomatic extraction from documentationVSAvoidaccuracy of extracted API details
Core Design Contradiction:
Ease of operationVSMeasurement precision

Solution Approach 1:

The system performs preliminary extraction using machine learning and regular expressions to generate an initial machine-readable API specification from documentation. This preliminary action is followed by validation through test case execution, ensuring both ease of automatic extraction and precision through subsequent verification

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The native API system acts as an intermediary to validate the extracted information. Test inputs generated from the extracted specification are passed through the actual API, and the responses serve as a mediator to verify whether the extracted information accurately represents the real API behavior

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10572370B2Test-assisted application programming interface (API) learning
Publication Date: 2020.02.25 FUJITSU LTD
  • US10572370B2 patent drawing
  • US10572370B2 patent drawing
  • US10572370B2 patent drawing

AI summary

A method of test-assisted application programming interface (API) learning includes generating a machine-readable API specification (API spec). The API spec is based on application of machine learning and regular expression processes to an API documentation. The method includes comparing the API spec to other API specifications. Based on the comparison, the method includes identifying a set of similar API specifications. The method includes generating API test inputs based on the set of similar API specifications and the API spec. The method includes calling a native API system using a first API test input of the API test inputs. The method includes receiving a response indicative of whether the first API test input successfully interacts with the native API system. Based on the response, the method includes generating a feedback indicative of an alteration to the API test inputs or to the machine learning or the regular expression processes.