Automated API Testing via HTML Form Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Manual testing of Application Programming Interfaces (APIs) is tedious and requires programming knowledge, making it inefficient and inaccessible to those without technical expertise.

Innovation Solution

A system and method for automatically testing APIs by determining the API type, generating HTML pages with UI elements, creating input data elements, invoking the API, and verifying outputs against expected results, using a processor and memory to execute programmed instructions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If manual testing is performed by software developers with programming knowledge, then the testing can be conducted using standard API invocation mechanisms, but the process becomes tedious and inaccessible to those without technical expertise

Engineering Contradiction:
ImproveEase of API testingVSAvoidComplexity of testing process
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary system that acts as a mediator between the user and the API testing process. This system automatically generates test scripts, invokes APIs, and analyzes responses, shielding users from the complexity of manual testing while maintaining ease of operation. The intermediary handles the tedious aspects of test execution, allowing users to focus on defining test scenarios.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The testing system performs self-service by automatically generating test cases, executing API invocations, and producing test reports without requiring continuous human intervention. The system autonomously manages the testing workflow, including generating appropriate test data, invoking APIs with correct parameters, and analyzing responses, thereby reducing the burden on testers while improving accessibility.

Inventive Principle:
Principle #25Self-service

2Productivity

If code wrappers and manual programming are used to create GUI for API testing, then the API functionality can be tested, but the process requires programming knowledge and becomes time-consuming

Engineering Contradiction:
ImproveAPI testing efficiencyVSAvoidTime required for testing setup
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by pre-generating test scripts and test data templates before actual API testing begins. It automatically creates the necessary test infrastructure, including test cases, input data, and expected output scenarios, based on API documentation or metadata. This preliminary setup eliminates the need for time-consuming manual programming during the actual testing phase.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent replaces the mechanical process of manual code writing and GUI creation with an automated system that generates test scripts programmatically. Instead of requiring testers to manually write code wrappers or create graphical interfaces, the system uses automated script generation technologies to produce executable test cases, significantly reducing the time and expertise required for test setup.

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

3Adaptability or versatility

If automated testing is implemented, then the need for programming knowledge is reduced, but the system complexity increases

Engineering Contradiction:
ImproveAccessibility to non-technical usersVSAvoidComplexity of automated testing system
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The automated testing system is designed with universality to handle multiple API types, protocols, and testing scenarios through a single unified platform. It can automatically adapt to different API specifications (REST, SOAP, GraphQL) and generate appropriate test scripts without requiring separate tools or programming expertise for each case. This multi-functionality makes the system accessible to non-technical users while managing complexity through standardization.

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

Data Source

PatentUS9846639B2System and method for automatically testing an application programming interface (API)
Publication Date: 2017.12.19 HCL TECH LTD
  • US9846639B2 patent drawing
  • US9846639B2 patent drawing
  • US9846639B2 patent drawing

AI summary

Disclosed is a method and system for automatically testing an API. The system may determine a type of the API, inputs handled and outputs generated by the API. The system may identify a web application template for invoking the API. Further, the system may generate a Hyper Text Markup Language (HTML) page for accepting input parameters. The system may then create input data elements using the input parameters. The system may invoke the API using the input data elements in order to generate output. The system may generate another HTML page for providing the output. The system may generate a set of test scripts for accepting inputs from a data file and then receive the inputs in the first HTML form. The system may submit the first HTML form to generate final outputs by the API. Further, the system may verify the final outputs in order to test the API.